How to add enterprise certification authority (CA) to git in cygwin (and some Linux distributions)

When you extract using git on Cygwin, you get:

Fetching origin fatal: unable to access 'https://.../...git': SSL certificate problem: self signed certificate in certificate chain error: Could not fetch origin 

The certificate was added to /etc/ssl/certs/ca-bundle.crt and other package files , but the problem appeared again in the next Cygwin update.

+7
git certificate ssl cygwin ca
source share
1 answer

git-remote-https will read the following files for ca certificates:

 /etc/ssl/certs/ca-bundle.crt /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt 

If you edit these files, they will be overwritten every time you start the Cygwin installation and the ca-certificates package is updated.

The correct / correct solution is to add the certificate to the pick up folder and run the pickup script, update-ca-trust:

 curl -sL http://ca.pdinc.us > /etc/pki/ca-trust/source/anchors/ca.pdinc.us.pem \ && update-ca-trust 

The post install script for the ca-certificate package will automatically restart the ca-trust script update every time it is updated. For more information:

 man update-ca-trust 
+10
source share

All Articles