解决 Jenkins SSL certificate problem- unable to get local issuer certificate

6 min read

解决 Jenkins SSL certificate problem: unable to get local issuer certificate

问题

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

解决方法

  1. You can use JGit and can fix it by creating a .gitconfig file in JENKINS_HOME with this lines:
[http]
sslVerify = false
  1. 本地安装ca证书
sudo cp /tmp/alpha.cer /usr/local/share/ca-certificates/alpha.crt
sudo update-ca-certificates

参考

https://blog.myssl.com/faq-miss-ca-certificate/