简体   繁体   English

错误打开连接 java.io.IOException:服务器返回 HTTP 响应代码:URL 501

[英]Error opening connection java.io.IOException: Server returned HTTP response code: 501 for URL

[get] Error opening connection java.io.IOException: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar

I'm getting this error while installing thrift-0.9.3(Apache Ant(TM) version 1.9.9).安装 thrift-0.9.3(Apache Ant(TM) 版本 1.9.9)时出现此错误。 I know that effective January 15, 2020, The Central Repository no longer supports insecure communication over plain HTTP and requires that all requests to the repository are encrypted over HTTPS, so I will have to change http with https.我知道从 2020 年 1 月 15 日起,中央存储库不再支持通过普通 HTTP 进行的不安全通信,并要求对存储库的所有请求都通过 HTTPS 加密,因此我必须将 http 更改为 https。

I tried placing the required configuration inside /etc/maven/setting.xml but it did not work.我尝试将所需的配置放在 /etc/maven/setting.xml 中,但没有奏效。

Any help will be appreciated.任何帮助将不胜感激。

Recent versions of Maven (eg 3.6.0) will already use HTTPS as default. Maven 的最新版本(例如 3.6.0)已经默认使用 HTTPS。 So upgrading Maven to a recent version will fix this problem.因此,将 Maven 升级到最新版本将解决此问题。

As an alternative, you can configure an older Maven version to use the canonical HTTPS endpoints, as specified by Sonatype :作为替代方案,您可以配置旧的 Maven 版本以使用由 Sonatype 指定的规范 HTTPS 端点:
https://repo1.maven.org or https://repo.maven.apache.org https://repo1.maven.orghttps://repo.maven.apache.org

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.io.IOException:服务器返回HTTP响应代码:503的URL:错误 - java.io.IOException: Server returned HTTP response code: 503 for URL: Error URLConnection错误 - java.io.IOException:服务器返回HTTP响应代码:URL为400 - URLConnection Error - java.io.IOException: Server returned HTTP response code: 400 for URL HttpURLConnection错误-java.io.IOException:服务器返回的HTTP响应代码:URL的400 - HttpURLConnection Error - java.io.IOException: Server returned HTTP response code: 400 for URL 错误是 java.io.IOException:服务器返回 HTTP 响应代码:URL 为 500:调用 weservice 时 - Error is java.io.IOException: Server returned HTTP response code: 500 for URL: while invoking weservice 错误:java.io.IOException:服务器返回 HTTP 响应代码:URL 403 - Error : java.io.IOException: Server returned HTTP response code: 403 for URL java.io.IOException:服务器返回HTTP响应代码:502 - java.io.IOException: Server returned HTTP response code: 502 java.io.IOException:服务器返回HTTP响应代码:500 - java.io.IOException: Server returned HTTP response code: 500 在Java代码中获取“ java.io.IOException:服务器返回的HTTP响应代码:URL的403:” - Getting “java.io.IOException: Server returned HTTP response code: 403 for URL: ” in java code java.io.IOException:服务器针对URL:“ SoapEndPoint url”返回了HTTP响应代码:500 - java.io.IOException: Server returned HTTP response code: 500 for URL:“SoapEndPoint url” java.io.IOException:服务器返回HTTP响应代码:403,URL: <url> - java.io.IOException: Server returned HTTP response code: 403 for URL: <url>
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM