How do I fix git certificate errors?

1k views Asked by At

While attempting to connect to our private Github Enterprise server, which is secured with a COMODO certificate, I'm getting a "fatal: unable to access 'https://github.domain/repository/project.git": error setting certificate verify locations:" error.

The error listed is copied from Android Studio, but git command line also fails the same way. Apparently something certificate related is broken, but other people at our site can connect fine. It's just me. Uninstalling and reinstalling Git does not solve the problem.

edit

I found a bogus CACert line in my users.gitconfig file. When I pulled that to match the other .gitconfig files (which don't have the line) I got a different error. I'm now getting SSL certificate problem: unable to get local issuer certificate from Git CLI and AndroidStudio Git. Note that Visual Studio Git and Netbeans Git work perfectly fine.

1

There are 1 answers

0
Brian Knoblauch On BEST ANSWER

The solution was to pre-pend all the latest COMODO root and intermediate certificates to our internal certificate and then apply that to the Github Enterprise server.