在国内有时候github上下载东西会非常慢……其中一个解决方案就是给git设置一个代理
- //查看当前设置
-
- git config --global http.proxy
-
- // 设置当前代理使用http或者socks 如果使用shadowsocks,那么就是socks5://127.0.0.1:1080
-
- 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 http.proxy 'socks5://127.0.0.1:1080'
-
- git config --global https.proxy 'socks5://127.0.0.1:1080' /
-
- // 删除代理
-
- git config --global --unset http.proxy
-
- git config --global --unset https.proxy
-
- PS: global表示全局设置