在Jenkins上从GitHub克隆:无法加载PEM客户端证书 [英] Cloning from GitHub on Jenkins: could not load PEM client certificate

查看:330
本文介绍了在Jenkins上从GitHub克隆:无法加载PEM客户端证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了一个构建服务器,想在Jenkins中克隆一个项目。

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

我收到以下错误:


致命:无法访问' https: //github.com/habitat-sh/sample-node-app/ ':无法加载PEM客户端证书,LibreSSL错误错误:02FFF00D:系统库:func(4095):权限被拒绝,(未找到密钥,密码短语错误或文件格式错误?)

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?)

它在公共GitHub上,不需要证书,一切都正常运行当我在终端上克隆时。另外,curl可以正常工作。

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.

您是否知道导致此问题的原因?尝试了很多堆栈溢出解决方案,例如将 git config --global http.sslVerify 设置为 false ,但它们都不起作用

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

(操作系统为macOS)

(the OS is macOS)

推荐答案

我能够自己解决此问题。问题是,詹金斯用户无法访问我在GitConfig中设置的ssl证书

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.

帮助将证书移至Jenkins用户目录中的原因。

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

这篇关于在Jenkins上从GitHub克隆:无法加载PEM客户端证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆