Pulling from Mercurial - certificate error
Asked Answered
A

1

21

I was trying to pull from a server, and I get the following error:

C:\Users\User\hg_repo>hg pull
abort: error: _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICAT
E:certificate verify failed

I have downloaded the certificate and installed it into Windows' Trusted Root Certification Authorities, but I still get the error. How can I get Mercurial to trust the certificate?

Aspergillosis answered 30/7, 2011 at 1:44 Comment(0)
A
27

In your user directory (e.g. C:\Users\ on Vista/Windows 7 or C:\Documents and Settings\ before that), there should be a file called 'mercurial.ini' (or if there isn't, just create an empty file with that name). Append a section to the bottom of that file that looks like this:

[web]
cacerts = C:\the\path\to\the\certificate\file.cer
Aspergillosis answered 30/7, 2011 at 1:47 Comment(4)
You don't need a dummy file, cacerts = with no path will work fine.Gynecocracy
Thank very much, Keyo! cacerts = with no path worked.Labyrinth
@Keyo That disables security checks entirelyDemello
I found that I had to put cacerts =! as per this answer: https://mcmap.net/q/339002/-how-to-entirely-disable-ssl-certificate-checks-in-mercurial-tortoisehgCopulation

© 2022 - 2024 — McMap. All rights reserved.