Thursday, December 15, 2016

git Fatal: SSL certificate problem: self signed certificate



Environment: window 7 with a  firewall 

The solution works for me is:

  1.  Export https://github.com’s certificate
  2.  Copy https://github.com’s certificate to git‘s certificate file
  3. Configure git’s proxy

Export certificate:

Enter https://github.com into Firefox, click on the lock icon:



Follow the righ arrow and click on “more info” , click on “security/view certificate/details”:



Click on “export”, select “X.509 Certificate with chain(PEM)(*.crt;*.pem)”.

Copy certificate

Open git’s certification file, in my case, it resides in
C:\Programs\Git\mingw64\ssl\certs\ca-bundle.crt.


Copy the content from the above exported file onto the end of
C:\Programs\Git\mingw64\ssl\certs\ca-bundle.crt.


Configure proxy

If you are behind a corporation firewall, chances are that you need to configure a proxy. In my case, without setting up a proxy, I continued to run into “SSL certificate problem: self signed certificate”, which was very confusing, because this error showed no clue to proxy. 

Run the following command to configure a proxy:

git config --global http.proxy YOURPROXY

No comments:

Post a Comment