繁体   English   中英

Git 在 Mac 上克隆 HTTPS 不工作

[英]Git clone on Mac with HTTPS not working

I use Git in Windows and Linux on a daily basis and I was just trying to get it going on my Mac but am having an issue doing a simple git clone . 我使用了来自 Git 网站的安装程序以及 bash 脚本,它在~/.MacOSX中添加了环境变量

我之所以这么说,是因为我不完全确定一切设置是否正确,我还将 ssh 密钥添加到我的 github 帐户中。

所以这是来自终端的完整 output

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

我研究了你的问题,发现有人有类似的问题。 显然,对他们来说问题是他们的路径中有一个重复的环境变量。 您确定 git 之前还没有安装在这台机器上吗? 你能看看你的 ~/.MacOSX 文件,看看里面有没有什么可疑的地方吗?

暂无
暂无

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

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