![](/img/trans.png)
[英]git unable to find certificate in keychain after updating to macOS Sierra
[英]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]
節(具有sslVerify
或sslCert
屬性),因此我根本不使用任何證書。
有趣的是-使用具有相同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.