Java eclipse无法下载插件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40667733/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to download plugin for eclipse
提问by user4447655
I am trying to download kotlin plugin for eclipse. I am able to connect to eclipse marketplace, but when i try to download it, I get an error:
我正在尝试为 Eclipse 下载 kotlin 插件。我能够连接到 eclipse 市场,但是当我尝试下载它时,出现错误:
Unable to read repository at
https://dl.bintray.com/jetbrains/kotlin/eclipse-plugin/last/content.xml.
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
I am behind a firewall and proxy settings are configured. I downloaded a certificate from this website and added it to keytool but the error is still the same. How I can resolve this error or install this plugin manually?
我在防火墙后面并且配置了代理设置。我从这个网站下载了一个证书并将其添加到 keytool 但错误仍然相同。如何解决此错误或手动安装此插件?
采纳答案by user4447655
Was able to solve the issue by appending the following to the eclipse.ini
:
能够通过将以下内容附加到以下内容来解决问题eclipse.ini
:
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
Found the above solution here: https://stackoverflow.com/a/33631964/4447655There is also solution if this still does not work, to uncheck SOCKS in the eclipse proxy settings.
在这里找到了上述解决方案:https: //stackoverflow.com/a/33631964/4447655如果这仍然不起作用,也有解决方案,在 eclipse 代理设置中取消选中 SOCKS。
回答by SachinSarawgi
While setting proxy setting in eclipse you will get three proxy entries to be configured HTTP, HTTPS and SOCKS. Configure username and password in HTTP and HTTPS proxy entries, but not in SOCKS. Try this, it may help.
在 eclipse 中设置代理设置时,您将获得三个要配置的代理条目 HTTP、HTTPS 和 SOCKS。在 HTTP 和 HTTPS 代理条目中配置用户名和密码,但不在 SOCKS 中。试试这个,它可能会有所帮助。
Also make sure the username and password you are typing is correct.
还要确保您输入的用户名和密码正确。
After configuration please restart eclipse, it is required for taking the effect of configuration.
配置完成后请重启eclipse,配置生效需要它。
回答by Donatello
Resolved by upgrading JVM (and the trusted certs ?)
通过升级 JVM(以及受信任的证书?)
回答by Peter Szanto
download the plugin manually from here
从这里手动下载插件
https://dl.bintray.com/jetbrains/kotlin/eclipse-plugin/0.8.5/
https://dl.bintray.com/jetbrains/kotlin/eclipse-plugin/0.8.5/
(check if there is a latest version here)
(检查这里是否有最新版本)
https://dl.bintray.com/jetbrains/kotlin/eclipse-plugin
https://dl.bintray.com/jetbrains/kotlin/eclipse-plugin
then
然后
- create a directory called kotlin-plugin and copy the features and plugins directory (with all the downloaded jars in it) into it.
- close eclipse
- copy the kotlin-plugin directory into ${eclipse-install}/dropins
- start eclipse
- 创建一个名为 kotlin-plugin 的目录,并将 features 和 plugins 目录(包含所有下载的 jars)复制到其中。
- 日食
- 将 kotlin-plugin 目录复制到 ${eclipse-install}/dropins
- 开始日食
回答by Peter
Original exception is very clear:
原来的异常很清楚:
sun.security.validator.ValidatorException
meaning that your certificate that eclipse gets doesn't validate with originating root certificate - or a variation of this story.
这意味着 eclipse 获得的证书不会通过原始根证书进行验证 - 或者这个故事的变体。
1. Add intercepting certificate to cacerts of java
1.在java的cacerts中添加拦截证书
Use command line to add "intercepting certificates" (see ps) into java cacerts keystore (or use some GUI like "KeyStore Explorer" or whatever google gives).
使用命令行将“拦截证书”(参见 ps)添加到 java cacerts 密钥库中(或使用一些 GUI,如“KeyStore Explorer”或谷歌提供的任何内容)。
2. Fix eclipse.ini and add below "-vmargs":
2.修复eclipse.ini并在“-vmargs”下面添加:
-Djavax.net.ssl.trustStore=cacerts
-Djavax.net.ssl.trustStorePassword=changeit
Note: use full path for "cacerts", I keep cacerts in eclipse folder. Avoid spaces and absolutely no quotes or you run into trustAnchors exception.
注意:使用“cacerts”的完整路径,我将 cacerts 保存在 eclipse 文件夹中。避免使用空格并且绝对没有引号,否则您会遇到 trustAnchors 异常。
Eclipse should work, market store and "install new software" will be happy now. Hope it will work for you as it did for me. Good luck.
Eclipse 应该可以工作了,现在市场商店和“安装新软件”会很开心。希望它对你有用,就像对我一样。祝你好运。
PS: To find intercepting certificate, open browser, go to stackoverflow.com, click on browser lock icon next to https sign, download all certificates you find and save them as file pem/cer. Import these into cacerts.
PS:要查找拦截证书,打开浏览器,进入stackoverflow.com,点击https标志旁边的浏览器锁图标,下载所有找到的证书并保存为文件pem/cer。将这些导入 cacert。
PS: More details on command line, trustAnchors exception because of quotes and spaces, here: stackoverflowand stackoverflow.
PS:有关命令行的更多详细信息,由于引号和空格引起的 trustAnchors 异常,请参见:stackoverflow和stackoverflow。
Remark to title and answer: -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
- is not addressing explained exception. It solves other type of problem.And title should be "can't install eclipse plugins due to certificate validation". It's typical for corporate workstation behind gateways, proxies, firewalls and intercept ssl trafic.
对标题和答案的评论:-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
- 未解决已解释的异常。它解决了其他类型的问题。标题应该是“由于证书验证,无法安装 eclipse 插件”。对于网关、代理、防火墙和拦截 ssl 流量后面的企业工作站来说,这是典型的。
回答by Abdeljalil HALLOUMI
You may try this solution:
你可以试试这个解决方案:
> sudo apt-get install ca-certificates-java
> sudo update-ca-certificates -f
add to eclipse.ini
添加到 eclipse.ini
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4