升级到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]
部分(具有sslVerify
或sslCert
属性),因此我根本没有使用任何证书。有趣的是-使用具有相同Git可执行文件并禁用
"Allow SourceTree to modify my global Git and Mercurial config files"
的SourceTree(因此使用相同的.gitconfig)可以正常工作。我也尝试过使用Homebrew的curl和
--with-brewed-curl
编译Git-没有任何变化。 最佳答案
解决方案是设置环境变量GIT_SSL_CERT
。因此,Git始终尝试使用不需要的证书。
关于git - 在MacOS Sierra上的Git https访问被破坏/SSL钥匙串(keychain)错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40765258/