Issues? Or something changed - cannot download artifact without user/pass prompt

Trying to download in a script from maven central using a URL I’ve used plenty before – this fails.

Has something changed? The URL still seems to be in the current docs?

➜ /tmp wget “http://repository.sonatype.org/service/local/artifact/maven/redirect\?r\=central-proxy\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies
–2023-05-09 09:15:25-- http://repository.sonatype.org/service/local/artifact/maven/redirect\?r\=central-proxy\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies
Resolving repository.sonatype.org (repository.sonatype.org)… 35.153.240.1, 52.7.7.122
Connecting to repository.sonatype.org (repository.sonatype.org)|35.153.240.1|:80… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: https://repository.sonatype.org/service/local/artifact/maven/redirect\?r\=central-proxy\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies [following]
–2023-05-09 09:15:25-- https://repository.sonatype.org/service/local/artifact/maven/redirect\?r\=central-proxy\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies
Connecting to repository.sonatype.org (repository.sonatype.org)|35.153.240.1|:443… connected.
HTTP request sent, awaiting response… 401 Unauthorized

Username/Password Authentication Failed.

In case it was DNS or local network blocking, I tried from a cloud vm…

Same issue, from 52.7.7.122

Still the same here - which is making me wonder if this is an intentional change ? Or my bad memory

This is now working again

I’m experiencing the same issue, this started today and have been going for a few hours now.
Seems like using queries like these just keeps throwing “401 - Unauthorized”.
@nigel.l.jones I also tried your link and indeed I get also a 401.
Anyone experience this?
I was thinking that maybe it is related to a recent incident in search.maven.org (Maven Central Status - search.maven.org is down)

Same here. Invalid URLs are correctly returning 404 with a descriptive error message, correct URLs returns 401. Anonymous authorisation also fails.

2 Likes

Same issue.
Guys, can you prioritize this one, if you are going to fix it?

1 Like

Maybe it’s related to this?

As mentioned above by @dudi - this problem has resurfaced in the last week. It worked for a while after initially being reported, but is again broken (presuming the change wasn’t intentional)

Hi all - I have made our team aware of this thread and will let you know of any updates I receive or info related to this issue. In the meantime, please let us know if anything changes. Thanks!

Still no changes

1 Like

I’m also seeing the same 401 error; any update from your team @mfrost ?

Hey @ben.garrett (and all) - thanks for following up. I checked back in with our team about this. It seems like you just want an API to call to download the latest version of an artifact on Maven Central.

The recommendation is to try, for example: https://search.maven.org/remote_content?g=com.datadoghq&a=dd-java-agent&v=LATEST

I should note that repository.sonatype.com is something our team does not recommend relying on at the moment.

Thanks @mfrost . To note - we are currently transitioning search.maven.org to central.sonatype.com. While we have a roadmap to ensure API compatibility with search.maven.org, endpoints will be prioritized by usage and may not be available in the near term.

I would suggest downloading and parsing the maven-metadata.xml from http://repo.maven.apache.org/maven2/ to find the latest version until central.sonatype.com has the appropriate API capabilities for anything that is mission critical.