Upload via ant/Maven stopped working with "reason phrase: Unauthorized (401)"

I have a pretty stable environment to upload to Sonatype my Java packages like fastutil. It has been pretty stable for the last +20 years so unfortunately I’ve become a bit rusty with the details.

Suddenly my tentative to stage an artifact are met with

/home/vigna/git/fastutil/build.xml:139: Could not deploy artifacts: Failed to deploy artifacts: Could not transfer artifact it.unimi.dsi:fastutil-core:pom:8.5.14 from/to sonatype-nexus-staging (https://oss.sonatype.org/service/local/staging/deploy/maven2/): status code: 401, reason phrase: Unauthorized (401)

The same setup was working up to 5 months ago, when I uploaded fastutil 8.5.13. I was wondering if there has been in this time some change to authentication that needs adjustments from my part. I’m sure the password/login in .m2/settings.xml are correct.

Any suggestion?

Hi, this seems like a question for the the Central Repository forum

Just moved this post to that forum for visibility!

1 Like

Thanks!

Unfortunately no help. I must say the very flaky nature of all the Java ecosystem is one of the things I’m not missing moving to Rust.

I’ll try to go through the whole configuration again.

@sebastiano.vigna it seems like you have the same problem as I have: Upload to OSSRH varying error codes since July 22nd
I don’t think we can solve it from our side - it’s something on Sonatype side, because (as you) I didn’t change anything…

I see. I’m available to do testing, but I don’t know who to contact…

Shouldn’t we try to file a bug report? We are already two people with the same issue.

Yes totally - would be good. Just I don’t know where. I thought this forum may be a way to get in touch…

From one of my contributors:

Sonatype now enforces token authentication instead of username and password. Refer to the user manual to generate your token.

More precisely, follow these instructions: Generating a token - Documentation

It is difficult for me to understand how can someone make such a major change and not arrange things so to emit a proper, useful error message.

1 Like

I previously did switch to a token, and still have that problem…

1 Like

My problem is also, that I cannot login anymore into neither https://oss.sonatype.org nor https://s01.oss.sonatype.org anymore:

grafik

Trying again obviously doesn’t help…

@mfrost can you please help us find the right spot where we can find help? Thanks

1 Like

Same here, @ph1. We can’t log in to s01.oss anymore, and it seems like our already-generated token that worked last week has now stopped working for artefact upload.

@mfrost we might need some help, this is holding a lot releases right now.

Hello, I have reached out to the Central team and learned they have been migrating user accounts to our new account management platform, and you should have received an email regarding this change. If you are receiving the 401 response or are unable to log in, please refer to the last two sections of Notice of Migration of Accounts to the New Account Management Platform - Documentation and/or reach out to the Central support team, if necessary (central-support@sonatype.com) for the work required to manually associate your new account with the correct permissions from your old account.

cc: @ph1

2 Likes

@edeboer thanks for taking the time.
I am now able to login into oss.sonatype.org again. However, is it possible that this change of username also changed the Token???

@edeboer, thank you so much. I was able to log in now! @ph1, maybe we need to generate a new token again? will try this

Hopefully that helps! If not, please reach out to central-support@sonatype.com for additional help.

cc: @ph1

@ph1 I user token definitely changed, probably check yours by going into Profile → User token → Acess user token

Yes totally. It was changed. However I don’t understand WHY the token was changed without me doing anything. Anyway, I am already modifying all my GitHub Actions secrets :-/