我刚刚在其中创建了一个github帐户和一个存储库,但是当尝试使用通过推荐网址创建本地工作副本时
git clone https://github.com/<user>/<project>.git
我收到类似的错误
致命:无法访问' https://github.com/ <用户> / <项目> .git ':服务器证书验证失败。CAfile:/ home / <用户> /。ssl / trusted.pem CRLfile:无
我在Debian Jessie上工作,我希望Debian和GitHub都能提供/依赖一系列公认的CA,但是显然我的系统不信任GibHub的证书。
有任何简单的方法可以解决此问题(无需经常推荐的“ GIT_SSL_NO_VERIFY = true”黑客和类似的解决方法)?
编辑:
附加信息:
删除〜/ .ssl / trusted.pem时,git错误消息更改为
fatal: unable to access 'https://github.com/tcrass/scans2jpg.git/': Problem with the SSL CA cert (path? access rights?)
编辑:
@VonC关于git https.sslCAinfo选项的建议使我步入正轨-我刚刚将下载的cacert.org CA添加到我的trust.pem中,现在git不再抱怨了。
首先确保您在中的Debian中安装了证书/etc/ssl/certs
。
如果没有,请重新安装它们:
sudo apt-get install --reinstall ca-certificates
由于该软件包不包含根证书,请添加:
sudo mkdir /usr/local/share/ca-certificates/cacert.org
sudo wget -P /usr/local/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt
sudo update-ca-certificates
确保您的git确实引用了这些CA:
git config --global http.sslCAinfo /etc/ssl/certs/ca-certificates.crt
是时钟。NTP服务器已关闭,系统时钟设置不正确,我没有注意到或认为最初没有进行检查,并且错误的时间导致验证失败。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句