繁体   English   中英

在MacOS Sierra上的Git https访问被破坏/ SSL钥匙串错误

[英]Git https access broken on MacOS Sierra / SSL keychain error

升级到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.

似乎对钥匙串的访问已损坏(使用[credential] helper = osxkeychain ),因为我可以在钥匙串中看到带有私钥的证书。 除此之外,我还添加了ssh-add -K ~/.ssh/id_rsa

我已经在这里阅读了有关此信息: https : //github.com/curl/curl/pull/1105,但我不确定为什么仍然可以通过按键访问?! 我的.gitconfig根本没有[http]节(具有sslVerifysslCert属性),因此我根本不使用任何证书。

有趣的是-使用具有相同Git可执行文件的"Allow SourceTree to modify my global Git and Mercurial config files"禁用"Allow SourceTree to modify my global Git and Mercurial config files" (因此,使用相同的.gitconfig)可以正常工作。

我也尝试过使用Homebrew的curl并使用--with-brewed-curl编译Git-没有任何变化。

解决方案是设置环境变量GIT_SSL_CERT 因此,Git始终尝试使用不需要的证书。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM