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
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.
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
[hostfingerprints]
hg.java.net = 22:d2:d5:43:96:0f:eb:e0:9a:20:b9:14:b4:d9:32:1e:6a:f3:37:11
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With