Netbeans 和Mercurial - 使用自签名证书从服务器克隆存储库
我有一个共享 Mercurial 存储库的网络服务器。它使用自签名证书在 HTTPS 中共享项目。
如果我想克隆存储库,我可以使用该命令(请注意 --insecure 选项,表示不要担心证书)。
hg clone --insecure https://server/repository
我的问题是:如何使用 Netbeans Mercurial 插件来做到这一点。如果我尝试这样做,则会出现以下错误:
Output: [abort: error: _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed]
谢谢
I have a web server that share mercurial repositories. It shares projects in HTTPS with a self-signed certificate.
If I want to clone a repository, I can use the command (note the --insecure option that say to don't worry about certificate).
hg clone --insecure https://server/repository
My question is: how to do that with the Netbeans Mercurial plugin. If I try to do that, I have the following error:
Output: [abort: error: _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed]
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
自 Mercurial 版本 1.7.4 起,您可以使用 hostfingerprints 部分明确信任您的主机。从 Netbeans 调用 Mercurial 时,这也适用。
Since version 1.7.4 of mercurial you can use the hostfingerprints section in .hgrc to explicitly trust your host. This also works when calling mercurial from Netbeans.
我找到了解决方案。这几乎就像奥尔多所建议的那样。
您所要做的就是找出您的提供商的证书(通过电子邮件询问他们,他们回复了我),它看起来像 http://www.selenic.com/mercurial/hgrc.5.html#hostfingerprints
然后在 Mercurial.ini 中输入一个条目。我在 C:\Users\MyUser\mercurial.ini 中找到了此文件。
完成此操作后,Netbeans 就能够成功从 java.net 克隆存储库。希望这有帮助。如果这不起作用,请告诉我。
如果您无法获得证书,那么您可以这样做
如何在 Mercurial / TortoiseHg 中完全禁用 SSL 证书检查?
I found a solution. It is almost like, as suggested by Aldo.
All you have to do is find out your provider's certificate (ask them through email, they replied me), it looks like http://www.selenic.com/mercurial/hgrc.5.html#hostfingerprints
then make an entry in mercurial.ini. I found this file in C:\Users\MyUser\mercurial.ini
Once I did this, Netbeans was able to clone the repository from java.net successfully. Hope this helps. Let me know if this doesn't work.
In case you are unable to get the certificate, then you can do this
How to entirely disable SSL certificate checks in Mercurial / TortoiseHg?