[英]Cannot access repo.spring.io - Getting unauthorized
我正在開發一個基於 gradle 的 Spring Boot 項目,該項目從“repo.spring.io”下載一些依賴項。 該應用程序過去可以正常工作,但現在我在下載依賴項階段看到錯誤。
當應用程序繼續下載https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar時,我收到 HTTP 響應錯誤代碼 401(未經授權)。
我不確定 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
如果有人對此有任何想法或觀察到類似問題,請提供幫助。
提前致謝!
根據這個問題的答案,Spring 團隊將 kibbosh 放在免費加載者上,使用他們的存儲庫作為公共分發渠道。
看起來您需要調整您的{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/沒有限制。
移動到 spring-boot 它需要一個 pluginRepositories 條目和 pom 中的 spring-releases repo,以獲取插件,但隨后遇到同樣的 401 錯誤。 添加 maven-central pluginRepository 修復了它。 pom中的最終條目是:
<pluginRepositories>
<pluginRepository>
<id>mavencentral</id>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.