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.
Create a session
Section titled “Create a session”- Open the server in a browser and sign in.
- Open the Publishing page.
- Choose the repository. Press “New publish session”.
- Enter a fresh TOTP code, or confirm with a passkey. A recovery code does not work here.
- 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.
Use the token
Section titled “Use the token”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.jarcurl -f -u publish:trs_TOKEN -T file.tar.gz \ https://repo.acme.com/raw/files/path/file.tar.gzcurl -u publish:trs_TOKEN -T app_1.0_amd64.deb \ https://repo.acme.com/debian/apt/upload/stable/main<server> <id>telesphorepo</id> <username>publish</username> <password>trs_TOKEN</password></server>publishing { repositories { maven { url = uri("https://repo.acme.com/maven/releases") credentials { username = "publish" password = "trs_TOKEN" } } }}Debian indexes rebuild after the deb.debounce time. See Debian.
End a session early
Section titled “End a session early”The token ends itself after 15 minutes. To end it sooner, send a DELETE with the same token:
curl -f -X DELETE -u publish:trs_TOKEN https://repo.acme.com/api/publish/sessions/SESSION_IDYour own sessions are at GET /api/publish/sessions. See HTTP API.
Gotchas
Section titled “Gotchas”- Remove the token from
settings.xmlorbuild.gradle.ktsafter 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-Afterheader. - A read token or another publish session token cannot create a session.