Linux Git: Cannot Access Remote: Error Certificate Validation Certificates

So, I am running OpenSUSE Leap 42.1 and Git 2.6.6. Until today, I had no problems pushing / pulling / pulling from a remote GitHub repository.

Now, today I get this error message:

fatal: unable to access 'https://github.com/myName/myProject.git/': error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none 

Anytime when I do push / pull / fetch, I get this. My first thought was to verify that the path to the file was specified and that there was no file in the / etc / ssl / certs file called ca-certificates.crt.

So ... I'm not quite sure what to do. Not sure why this suddenly stopped working, maybe the OS or Git update broke it? In any case, hoping that he will be sent in the right direction.

Thanks.

+5
source share
2 answers

Apparently, sometimes certificate files change, so you need to save a set of several, not just one! Moreover, I recommend trying and maintaining a secure connection rather than disconnecting it:

 git config --system http.sslVerify false 

Or worse:

 git config --global http.sslVerify false 

This is a very bad practice and should be avoided for all reasons.

So, first find this package certificate file. On Windows, it is under the git installation directory, for example:

D: \ Program Files \ Git \ mingw64 \ ssl \ certs \ ca-bundle.crt

On Linux, you can try something like this (I did not):

 $ curl-config --ca **/etc/ssl/certs/ca-certificates.crt** 

or maybe this is another place:

 **/etc/ca-certificates/extracted/ca-bundle.trust.crt** 

No matter where it is possible, or the operating system you use when you receive this certificate file, you need to tell git to configure this certificate. You can modify the git.config file for several reasons, but one direct way:

 git config --system http.sslcainfo /bin/curl-ca-bundle.crt 

Hope this helps. There is another discussion for more information. Please let me know if this helps.

+5
source

verify that there may be an ssl file elsewhere. I have the same problem when installing Windows 10, and I solved it by creating the usr directory and copying the contents of the ssl directory to the usr directory.

0
source

All Articles