Cloning from GitHub on Jenkins: could not load PEM client certificate

左心房为你撑大大i 提交于 2020-08-26 04:58:22

问题


I set up a build server and want to clone a project in Jenkins.

I get the following error:

fatal: unable to access 'https://github.com/habitat-sh/sample-node-app/': could not load PEM client certificate, LibreSSL error error:02FFF00D:system library:func(4095):Permission denied, (no key found, wrong pass phrase, or wrong file format?)

It is on public GitHub, no certificates should be needed, everything is working correctly when I clone on terminal. Also, curl works without any problems.

Do you have any ideas what causes the issue? Have tried a lot of stack overflow solutions, e.g. setting git config --global http.sslVerify to false, but none of them is working

(the OS is macOS)


回答1:


I was able to resolve the issue myself. The problem was, that the Jenkins-user was not able to access the ssl certificates, that I set in the GitConfig

git config --global http.sslCert "~/Documents/certificates/cert.crt"
git config --global http.sslKey "~/Documents/certificates/cert.key"
git config --global http.sslCaInfo "~/Documents/certificates/cert-ca.crt"

Surprisingly, there was no permission error shown, which made this issue hard to debug.

What helped was moving the certificates in the directory of the Jenkins user.



来源:https://stackoverflow.com/questions/53839900/cloning-from-github-on-jenkins-could-not-load-pem-client-certificate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!