# "401 Content access is protected by token" authentication failure while performing maven release

**URL:** <https://community.sonatype.com/t/401-content-access-is-protected-by-token-authentication-failure-while-performing-maven-release/12741>\
**Category:** Central Repository\
**Tags:** help, nexus-repository\
**Created:** [June 17, 2024, 9:45pm UTC](https://community.sonatype.com/t/401-content-access-is-protected-by-token-authentication-failure-while-performing-maven-release/12741 "2024-06-17T21:45:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bitspittle](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bitspittle](https://community.sonatype.com/u/bitspittle)\
**Post date:** [June 18, 2024, 10:06pm UTC](https://community.sonatype.com/t/401-content-access-is-protected-by-token-authentication-failure-while-performing-maven-release/12741/4 "2024-06-18T22:06:10Z")

</div>

I ran into this as well. The instructions from @mben-soula worked for me –

1. Go to [https://s01.oss.sonatype.org/](https://s01.oss.sonatype.org/)
2. Go to profile
3. Change the pulldown from “Summary” to “User Token”
4. Click on “Access User Token”

I am using Gradle in my project, so I have all my credentials stored in a private gradle.properties file. Using the username and password values from the “Access User Token” popup, I created two new entries:

```auto
ossrhToken=...
ossrhTokenPassword=...

```

And finally, I updated my Gradle build script, shoud look something like this:

```auto
maven {
    credentials {
        username = findProperty("ossrhToken") as String
        password = findProperty("ossrhTokenPassword") as String
    }
}

```

---

_[View the full topic](https://community.sonatype.com/t/401-content-access-is-protected-by-token-authentication-failure-while-performing-maven-release/12741)._
