Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 288
Pascal Avatar asked Oct 19 '25 14:10

Pascal


1 Answers

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.

like image 174
Pascal Avatar answered Oct 22 '25 03:10

Pascal