Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Received status code 401 from server: Content access is protected by token #868

Open
strider1981 opened this issue Nov 7, 2024 · 1 comment

Comments

@strider1981
Copy link

While publishing the artifact I am getting the following error.

Failed to publish publication 'maven' to repository 'mavenCentral'. Could not PUT 'https://s01.oss.sonatype.org/service/local/staging/deployByRepositoryId. Received status code 401 from server: Content access is protected by token

I have generated a token from Nexus repo but how can I configure the plugin to use the token instead of user name and password?

@ItzNotABug
Copy link

  1. Generate a token via https://s01.oss.sonatype.org/#profile;User%20Token
  2. Use the given credentials for mavenCentralUsername & mavenCentralPassword in your ~/.gradle/gradle.properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants