vanniktech/gradle-maven-publish-plugin

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

strider1981 opened this issue · 1 comments

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?

  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.