开发者

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. I used the installer from the Git website as well as the bash script which adds the environment variable in ~/.MacOSX

I say that because I'm not completely sure everything is setup correctly, I also have the ssh key added to my github account.

So heres the full output from the terminal

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$开发者_开发百科

Here is what the environment.plist looks like:

<?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>


This is what worked for me and it may or may not be the best solution but its certainly the easiest.

git config --global --add http.sslVerify false


I researched your problem a bit and found someone that had a similar issue. Apparently what the issue was for them was that they had a duplicate environment variable in their path. Are you positive that git has not already been installed on this machine before? Could you take a look at your ~/.MacOSX file and see if there is anything fishy going on in it?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜