Skip to main content

Server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

I have got this error while try to clone repository from github through jenkins. jenkins cannot get the repo and got message in log.

stderr: fatal: unable to access 'https://github.com/username/repo.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

How to resolve this error : 


1. Get sslServer from github : 

sudo keytool -printcert -rfc -sslServer github.com

copy thus certificates shows.

2. add key shows to the ca-certificates.crt : 

sudo vim /etc/ssl/certs/ca-certificates.crt

add those key to the ca-certificates.crt. Don't remove it's content, just add new line.

Comments