解决github fatal: unable to access的问题

一、通过命令行(方法一)

设置代理:

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

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

取消代理:

git config --global --unset http.proxy

git config --global --unset https.proxy

二、通过修改配置文件方式(方法二)

 C:\Users\当前用户名\.gitconfig

用任何文本编辑器,打开如上文件,修改文本内容如下:

[https]
    proxy = 'socks5://127.0.0.1:1080'
[http]
    proxy = 'socks5://127.0.0.1:1080'

 

posted @ 2023-12-12 11:47  童年的回忆  阅读(682)  评论(0编辑  收藏  举报
如果本博客解决了您的问题,可以微信支付宝打赏鼓励一下作者哦,在此表示感谢