我每天都在 Windows 和 Linux 中使用 Git,我只是想在我的 Mac 上运行它,但在执行简单的 git clone
时遇到了问题。我使用了 Git 网站上的安装程序以及在 ~/.MacOSX
我这么说是因为我不能完全确定所有设置是否正确,所以我还将 ssh key 添加到我的 github 帐户。
这是终端的完整输出
myComp:Sites me$ git clone https://github.com/me/some_project.git
Cloning into some_project...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/me/some_project.git/info/refs
fatal: HTTP request failed
myComp:Sites me$
这是 environment.plist 的样子:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/X11/bin</string>
</dict>
</plist>
最佳答案
这对我有用,它可能是也可能不是最好的解决方案,但它肯定是最简单的。
git config --global --add http.sslVerify false
关于使用 HTTPS 的 Mac 上的 Git 克隆不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6191742/