SSL certificate problem: self signed certificate in certificate chain git
Table of Contents
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
git config –global http.sslVerify false
For specific repository
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.
Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in IT industry more than 7 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting and Website Development.
I am a self learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.