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 repo.domain.com:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin
And replace your repo.domain.com 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
[hostfingerprints] repo.domain.com=AB:41:11:21:12:5F:07:7A:BC:0D:F4:5D:3B:D3:8A:11:B1:33:A5:91