Git: solve on your PC: SSL certificate problem: self signed certificate in certificate chain

 

$ git clone https://github.com/.../....git
Cloning into '...'...
fatal: unable to access 'https://github.com/.../....git/': SSL certificate problem: self signed certificate in certificate chain

When using an antivirus that monitors the content of the SSL (TLS) encrypted stream, it interposes itself and therefore changes the site's certificate. We therefore receive an encrypted flow with the new certificate signed by a certification authority of the antivirus. If git does not know the certification authority, it will consider the certificate to be signed with self-signed one. We then need to configure Git to give it the certificate authority so that Git can verify that the repository certificate is authentic according to the antivirus certification authority.

To do this we will create an environment variable GIT_SSL_CAINFO with the path to the authority's certificate.

For example :

on windows create an environment variable GIT_SSL_CAINFO with the path to the CA C:\Users\YOUR_USER\the_antivirus_root_ca.cer (for example in format X.509 encoded in base 64.). On Windows you can use %USERPROFILE% instead of C:\Users\YOUR_USER => %USERPROFILE%\the_antivirus_root_ca.cer

The logic is the same on Linux.

You can now try again ; it should be ok now (on Windows start new Git Bash window to get the new environment variables)