我想使用可通过 https 访问的 git 存储库,Https 服务器具有自签名证书。我在尝试使用 eclipse+egit 克隆 repo 时总是出错:
https://host/path: cannot open git-upload-pack sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
是否可以绕过这个问题?我使用 export GIT_SSL_NO_VERIFY=1
命令跳过控制台客户端的 ssl 验证。这个技巧不适用于 eclipse。
谢谢,
虎扑
最佳答案
您也可以将 eGit 设置为忽略服务器验证。在 Eclipse 中转到窗口 -> 首选项。
从那里转到 Team -> Git -> Configuration
点击“新建条目”
key :http.sslVerify 值:假
点击“确定”
点击“确定”
有关更详细的方法,请在此处查看我的博客文章: http://www.pur-logic.com/2012/04/21/egit-self-signed-certificate/
关于java - 带有自签名证书的 egit,https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8123628/