Skip to content

Generating a Portal Token for Publishing⚓︎

OSSRH Publishers

This documentation is for publishing via the Central Publisher Portal. For publishing via OSSRH, please see the OSSRH token documentation.

You must use a user token to publish artifacts to the Central Repository via the Central Publisher Portal.

  1. Log in to the Central Publisher Portal and navigate to your account at https://central.sonatype.com/account A screenshot of the accounts page that shows the Generate User Token button
  2. Press the Generate User Token button
  3. Confirm the generation (note: this will invalidate an exiting token) A screenshot of the modal that confirms regeneration of the token
  4. Save the generated credentials for use in your publishing setup A Screenshot of the modal that displays the user token once it has been
   generated

Token access

Tokens cannot be retrieved once the modal closes, so it is a publisher's responsibility to maintain control of the token or generate a replacement as needed.