(转)git clone出现 fatal: unable to access 'https://github.com/...'的解决办法

如下图所示,当我Git克隆别人的repo时,会发生这样的错误.发现它尝试用http和https代理,后来仔细回想了下,原来是自己用了代理,忘记取消

 

 # 查看当前git 的设置

git config --global -l

# 设置代理

git config --global http.proxy http://127.0.0.1:1080

git config --global https.proxy http://127.0.0.1:1080

http://也可以改成sockets5://,但是区别在于:socks5不支持通过pubkey免密登录github,每次提交代码只能输入用户名和密码。http可以支持免密登录。

# 取消代理:

git config --global --unset http.proxy 

git config --global --unset https.proxy 

参考文献:

https://blog.csdn.net/dashi_lu/article/details/89641778



猜你喜欢

转载自www.cnblogs.com/Cong0ks/p/12557905.html