SSL certificate problem: self signed certificate in certificate chain git

SSL certificate problem: self signed certificate in certificate chain git

 

Generally, the issue is a self-signed certificate because the self-signed certificate can not be trusted by any system automatically. So we need to tell the system to trust the self-signed certificate or disable the certificate validation.

Due to this error, you can not clone the project into your local system.

In the git, if you are using a self-signed certificate, you can not clone the project into your local system. So for time being, you can disable the self-signed certificate by using the following git configuration command, and then you can clone the project into your local system.

By default http.sslVerify value is true

Global  settings

git config –global http.sslVerify false

 

For specific repository

git init

git config http.sslVerify false

After executing the command, the self-signed certificate validation disabled. Then you can clone the project into your system without any issue.

http.sslVerify
      It Can be overridden by the GIT_SSL_NO_VERIFY environment variable.

http.sslCAInfo
    It Can be overridden by the GIT_SSL_CAINFO environment variable.

http.sslCAPath
    It Can be overridden by the GIT_SSL_CAPATH environment variable.

The certificate can be added using the command 
git config --global http.sslCAInfo C:/Users/<yourname>/ca-bundle.crt

Generally, it is not recommended, to disable the certificate so you have to get the CA-signed certificate.

 

 

Leave a Reply