java - 带有自签名证书的 egit,https

标签 java eclipse git https egit

我想使用可通过 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/

相关文章:

eclipse - 导入项目时出现Gradle/Eclipse问题

java - "The prefix "xliff "for element "xliff :g "is not bound"

git - 在 TortoiseSVN 中使用 github 个人访问 token

git - git 提交消息的 vim 语法突出显示 - 自定义 commentchar

java - 删除 JAXB 中的前导/尾随空格?

java - getMapAsync 错误

java - 如何为输入的整数设置 try/catch

css - JSP 页面看不到 css

windows - 与 GitHub 相比,Windows 文件共享上的 Git 速度慢

java - 如何在不使用 @PersistenceContext 注释的情况下以编程方式获取特定的 EntityManager