# Status code: 401, reason phrase: Content access is protected by token

## post by mhryrehman on Jul 30, 2024

Dear Support Team,

I am currently experiencing an issue while trying to deploy a dependency using a user token generated from [Maven Central: My Account](https://central.sonatype.com/account).

Despite following the necessary steps, I encounter the following error during the deployment process:

```
[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 17.718 s

[INFO] Finished at: 2024-07-30T11:56:59+05:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) on project dependency-test: Failed to deploy artifacts: Could not transfer artifact io.github.mhryrehman:dependency-test:jar.asc:sources:0.0.1-20240730.065642-1 from/to ossrh ( [Index of /repositories/snapshots](https://s01.oss.sonatype.org/content/repositories/snapshots)): status code: 401, reason phrase: Content access is protected by token (401) → [Help 1]
```

Could you please provide support on this issue and let me know if I am missing any steps? If further information is required from my side, please let me know. My pom.xml file is also given at bottom.

Thank you for your assistance.

Best regards,

Yasir Rehman

[mhryrehman@gmail.com](mailto:mhryrehman@gmail.com)

## post by akeibler on Jul 31, 2024

Hello Yasir,

We verified that you have reset your token after posting it on a public forum. We have followed up with you directly through your request to our [central-support@sonatype.com](mailto:central-support@sonatype.com) channel.

For everyone who has come across this post, please understand the importance of keeping your Maven Central publishing credentials private (including from Sonatype support staff). For more information, please see our [policy on credentials](https://central.sonatype.org/pages/support/#credential-security).

The answer to this particular issue is that [tokens generated via the Central Publisher Portal](https://central.sonatype.org/publish/generate-portal-token/) cannot be used for OSSRH, which [have their own tokens](https://central.sonatype.org/publish/generate-token/).

Thank you

## post by edeboer on Jul 31, 2024

Hello Yasir - In support of [@akeibler](https://community.sonatype.com/u/akeibler)’s note above, I removed the credentials from your original post in an abundance of caution.

## post by mhryrehman on Aug 1, 2024

Hi Amelia,

Thank you for your support. I am currently unable to log in to [https://s01.oss.sonatype.org/](https://s01.oss.sonatype.org/) using the same credentials I use for [https://central.sonatype.com/](https://central.sonatype.com/) and [https://community.sonatype.com/](https://community.sonatype.com/). I receive the error message: “Incorrect username, password, or no permission to use the Nexus User Interface. Try again. Please [login](https://s01.oss.sonatype.org/) before attempting further requests.”

Could you please guide me on which credentials should be used to log in to [https://s01.oss.sonatype.org/](https://s01.oss.sonatype.org/)?

## post by akeibler on Aug 1, 2024

Hello Yasir,

As we mentioned in the response to your support request email, your account does not have access to OSSRH. We would prefer you follow up via that email thread to address your request, as it is specific to your account and not a broadly-applicable question.

Thank you
