当尝试连接到 Eclipse 中的更新站点以安装 Cucumber-Eclipse 插件时,出现以下错误:
Unable to read repository at http://cucumber.io/cucumber-eclipse/update-site/content.xml.
Unable to read repository at http://cucumber.io/cucumber-eclipse/update-site/content.xml.
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested
target
最佳答案
本例中的问题最初具有误导性,因为 SunCertPathBuilderException 的所有其他答案都与 java cacerts 文件中缺少证书有关。
这里实际上是由 URL 重定向引起的。 Cucumber-Eclipse 网站列出了其插件的更新站点:
但是,当在浏览器中导航到该 URL 时,它会重定向到:
注意添加的“.github”。
分辨率
如果 Eclipse 插件遇到此问题,请在浏览器中导航到更新站点 URL,并在页面加载后从那里复制 URL。这将为您提供真正的更新站点 URL,然后可以将其添加为 Eclipse 中的可用站点。
关于java - 当收到 "Unable to read repository"ProvisionException 错误时,如何连接到 Eclipse 中的更新站点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43726879/