While trying to use
git clone on my CentOS server, I encountered
fatal: HTTP request failed with error description showing something being wrong with my SSL CA Root certificates as shown below. To resolve this error simply follow any one of the solution posted below.
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/........
The reason for the error is older version of CentOS 5.XX having expired certificate authority bundles, the root certificate bundle is located at :
Execute the command
git config --system http.sslVerify false
on console and retry connecting, this will simply bypass the SSL verification. Do mind that this can be dangerous from security point of view, SSL signature verification exists to safeguard against man in the middle attacks and this disables that safety feature. Use only when other solution's shared below does not work.
yum update openssl
or equivalent command to get the latest version of OpenSSL library which will renew the working set of CA certificates (ca-bundle.crt).
Use curl and replace the certificate bundle with new ones using
curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt