Skip to content
Select theme
  • Auto
  • Dark
  • Light

Manual sessions

A manual session lets you publish from any machine, without a plugin, a device or a CI trust policy. You sign in to the web UI, prove a second factor, and copy a token. The token works for 15 minutes by default.

  1. Open the server in a browser and sign in.
  2. Open the Publishing page.
  3. Choose the repository. Press “New publish session”.
  4. Enter a fresh TOTP code, or confirm with a passkey. A recovery code does not work here.
  5. Copy the token. It starts with trs_.

You need a second factor on your account. Add one on the Security page first. See Accounts and 2FA. You also need the write permission on the repository.

The page shows ready-made snippets for the repository. Use the token as the password. Any user name works.

Terminal window
curl -f -u publish:trs_TOKEN -T app-1.0.jar \
https://repo.acme.com/maven/releases/com/acme/app/1.0/app-1.0.jar

Debian indexes rebuild after the deb.debounce time. See Debian.

The token ends itself after 15 minutes. To end it sooner, send a DELETE with the same token:

Terminal window
curl -f -X DELETE -u publish:trs_TOKEN https://repo.acme.com/api/publish/sessions/SESSION_ID

Your own sessions are at GET /api/publish/sessions. See HTTP API.

  • Remove the token from settings.xml or build.gradle.kts after the publish. It expires soon, but it is still a working credential.
  • A token works for one repository only.
  • The time limit is publish.session_ttl. An admin can set it up to 1 hour.
  • If the token expires during a long upload series, create a new session.
  • Wrong second-factor codes count toward the rate limit. After too many, the server answers 429 with a Retry-After header.
  • A read token or another publish session token cannot create a session.