[英]How to get Git accept my self signed SSL certificate?
My Git installation refueses hard to git clone
a repo due to a 我的Git安装因为a而难以
git clone
回购
fatal: unable to access 'https://XXXX/svn/...': SSL certificate problem: unable to get local issuer certificate
error. 错误。
This is a common question around the Web, answered here and here . 这是围绕Web的常见问题, 在这里和这里得到解答。 The solution consists of
解决方案包括
1) either appending the certificate to the end of the cert-bundle
file, or providing it as a solo file 1)将证书附加到
cert-bundle
文件的末尾,或者将其作为独立文件提供
2) making sure that the git config http.sslCAInfo
property is pointed to the correct location in the correct config file. 2)确保git配置
http.sslCAInfo
属性指向正确配置文件中的正确位置。
On the account of finding which config file that is, here and here is where to look. 在查找哪个配置文件的帐户中, 此处和此处是查找的位置。
All configs listed in git config --list --show-origin
point to the right cert-bundle
, which of course contains the right key. git config --list --show-origin
列出的所有配置都指向正确的cert-bundle
,当然包含正确的密钥。
Any thoughts on what else can break the certificate validation process? 有什么想法可以打破证书验证过程吗? The error message suggests that Git (or the lib doing the job) wasn't even able to get the certificate.
错误消息表明Git(或执行该作业的lib)甚至无法获得证书。 Any thoughts on how's that even possible?
有关如何甚至可能的任何想法?
When I want to interact with something that is going to use a self signed certificate, I just ask git to not care for it. 当我想与将要使用自签名证书的东西进行交互时,我只是要求git不关心它。 It can be configured (I think) at the repo level (or even at the global level) but I'd rather do it on the commands like fetch so that I'm always aware of what's happening.
它可以在repo级别(甚至在全局级别)进行配置(我认为),但我宁愿在fetch之类的命令上进行配置,以便我始终了解正在发生的事情。
git -c http.sslVerify=false fetch
. git -c http.sslVerify=false fetch
。 That should do. 那应该做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.