[英]Git https access broken on MacOS Sierra / SSL keychain error
after upgrading to MacOS Sierra my Git stopped working with https Repos like GitHub. 升级到MacOS Sierra之后,我的Git不再使用GitHub之类的https Repos。
git clone https://github.com/monday-consulting/FSDevTools.git
Cloning into 'FSDevTools'...
fatal: unable to access 'https://github.com/monday-consulting/FSDevTools.git/': SSL: Can't find the certificate "My User" and its private key in the Keychain.
It seems like the access to the Keychain is broken (using [credential] helper = osxkeychain
) as I can see the Certificate with it's private key in the keychain. 似乎对钥匙串的访问已损坏(使用
[credential] helper = osxkeychain
),因为我可以在钥匙串中看到带有私钥的证书。 In addition to that I've added it with ssh-add -K ~/.ssh/id_rsa
除此之外,我还添加了
ssh-add -K ~/.ssh/id_rsa
I've read about this here: https://github.com/curl/curl/pull/1105 but I'm not sure why there is a keychin access anyways?! 我已经在这里阅读了有关此信息: https : //github.com/curl/curl/pull/1105,但我不确定为什么仍然可以通过按键访问?! My .gitconfig has no
[http]
section at all (with the sslVerify
or sslCert
properties) so I'm not using any Certificates at all. 我的.gitconfig根本没有
[http]
节(具有sslVerify
或sslCert
属性),因此我根本不使用任何证书。
The funny thing is - using SourceTree with the same Git executable and "Allow SourceTree to modify my global Git and Mercurial config files"
disabled (so using the same .gitconfig) is working without problems. 有趣的是-使用具有相同Git可执行文件的
"Allow SourceTree to modify my global Git and Mercurial config files"
禁用"Allow SourceTree to modify my global Git and Mercurial config files"
(因此,使用相同的.gitconfig)可以正常工作。
I've also tried using curl from Homebrew and compiling Git with --with-brewed-curl
- nothing changed. 我也尝试过使用Homebrew的curl并使用
--with-brewed-curl
编译Git-没有任何变化。
The solution was the environmental variable GIT_SSL_CERT
being set. 解决方案是设置环境变量
GIT_SSL_CERT
。 So Git always tried to use a certificate that was not needed. 因此,Git始终尝试使用不需要的证书。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.