Received status code 401 from server: Content access is protected by token
strider1981 opened this issue · 1 comments
strider1981 commented
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 commented
- Generate a token via
https://s01.oss.sonatype.org/#profile;User%20Token
- Use the given credentials for
mavenCentralUsername
&mavenCentralPassword
in your~/.gradle/gradle.properties
.