git

耗尽温柔 提交于 2019-11-27 10:49:16

本地开启VPN后,GIt也需要设置代理,才能正常略过GFW,访问goole code等网站

设置代理:

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

发现clone的时候使用https出现问题

fatal: unable to access 'https://github.com/bailicangdu/vue2-elm.git/': Received invalid version in initial SOCKS5 response.

取消代理

git config --global --unset http.proxy
git config --global --unset https.proxy

查看全部的git全局设置

git config --global --unset http.https://github.com.proxy

只对github.com

git config --global http.https://github.com.proxy socks5://127.0.0.1:1080 
git config --global --unset http.https://github.com.proxy   
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!