Issues? Or something changed - cannot download artifact without user/pass prompt - Central Repository - Sonatype Community
Issues? Or something changed - cannot download artifact without user/pass prompt
post by nigel.l.jones on May 9, 2023
Nigel Jones
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?
–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.
post by nigel.l.jones on May 9, 2023
In case it was DNS or local network blocking, I tried from a cloud vm…
Same issue, from 52.7.7.122
post by nigel.l.jones on May 9, 2023
Still the same here - which is making me wonder if this is an intentional change ? Or my bad memory
post by nigel.l.jones on May 12, 2023
This is now working again
25 days later
post by dudi on Jun 6, 2023
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)
post by vito on Jun 6, 2023
Same here. Invalid URLs are correctly returning 404 with a descriptive error message, correct URLs returns 401. Anonymous authorisation also fails.
post by alexey.zakharchenko on Jun 7, 2023
Same issue.
Guys, can you prioritize this one, if you are going to fix it?
post by dudi on Jun 7, 2023
Maybe it’s related to this?
post by nigel.l.jones on Jun 12, 2023
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)
post by mfrost on Jun 12, 2023
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!
post by dudi on Jun 18, 2023
Still no changes
3 months later
post by ben.garrett on Sep 5, 2023
I’m also seeing the same 401 error; any update from your team @mfrost ?
post by mfrost on Sep 5, 2023
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.
post by jyoung on Sep 6, 2023
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.