Mercurial host fingerprint warning

The problem:

Recently I have updated my system and also mecrurial. Today I tried to do some work with a repository hosted in another machine and I got the following warning:

"warning: certificate with fingerprint e1:0e:46:81:37:20:33:aa:42:c0:98:d7:e9:7f:c6:19:7a:ee:d5:37 not verified (check hostfingerprints or web.cacerts config setting)" 

This really annoyed me and I did some search around what is necessary to do to get rid of this warning. And the solution follows.

The solution:

Add the following lines to the .hgrc file which is located in your home directory (if the file is not there create it).

[hostfingerprints] = e1:0e:46:81:37:20:33:aa:42:c0:98:d7:e9:7f:c6:19:7a:ee:d5:37


Assuming that e1:0e:46:81:37:20:33:aa:42:c0:98:d7:e9:7f:c6:19:7a:ee:d5:37 is the fingerprint for your host (displayed in the warning message).

And this should be enough to not see the warning message anymore.

Tags: , ,

Leave a Reply

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