Setting Host Fingerprints for Mercurial

If you get the error

abort: error: _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

while cloning a Mercurial repo, then you need to add the host fingerprint into the .hgrc file.

Run this command:

openssl s_client -connect < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin

And replace your with your domain where is the repo.

The output will be something like:

SHA1 Fingerprint=AB:41:11:21:12:5F:07:7A:BC:0D:F4:5D:3B:D3:8A:11:B1:33:A5:91

Put in ~/.hgrc





Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.