(转)git clone出现 fatal: unable to access 'https://github.com/...'的解决办法
Posted Cong0ks
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(转)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
以上是关于(转)git clone出现 fatal: unable to access 'https://github.com/...'的解决办法的主要内容,如果未能解决你的问题,请参考以下文章