Cannot access repo.spring.io - Getting unauthorized

Nac*_*eja 6 spring-io

I'm working on a gradle based spring boot project which downloads some dependencies from 'repo.spring.io'. The application used to work fine a while back but now I'm seeing an error in the download dependencies stage.

When the application goes on to download https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar, I receive an error with HTTP response code 401(Unauthorized).

我不确定 repo.spring.io 端最近是否有一些变化,因为这以前在我的应用程序上运行没有任何问题。

这是我得到的确切错误以供参考-

What went wrong:
19:44:19 A problem occurred configuring project ':account_settings-service'.
19:44:19 > Could not resolve all files for configuration ':account_settings-service:classpath'.
19:44:19    > Could not download commons-logging.jar (commons-logging:commons-logging:1.1.3)
19:44:19       > Could not get resource 'https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar'.
19:44:19          > Could not HEAD 'https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar'. Received status code 401 from server: Unauthorized 
Run Code Online (Sandbox Code Playgroud)

如果有人对此有任何想法或观察到类似问题,请提供帮助。

提前致谢!

Dav*_*ock 6

根据这个问题的答案,Spring 团队正在使用他们的存储库作为公共分发渠道来消除那些不劳而获的人。

看起来您需要调整您的{build thingy},以便它不会尝试从https://repo.spring.io/libs-milestone/下载

如果commons-logging:commons-logging:1.1.3是 Apache 项目,“Maven Central”(又名https://repo.maven.apache.org/maven2/,是 Apache 存储库)托管https://repo.maven.apache.org/maven2/ commons-logging/commons-logging/1.1.3/无限制。

  • 注:我刚才也处于类似的情况。我发现 https://mvnrepository.com/ 只是一个元目录(支持广告),您可以通过检查条目的“存储库”标签来判断哪些存储库托管各种包:例如。https://mvnrepository.com/artifact/commons-logging/commons-logging/1.2 在你的情况下。单击任意存储库“标签”即可浏览存储库的“实际 URL”。 (2认同)