原文地址:解决Github pull和push慢
因为网络环境限制 ,github在国内访问比较慢,有时项目比较大时,经常拉取不下来。
Git 设置代理
用Git内置代理,直接走系统中运行的代理工具中转,比如你的代理工具本地端口是 10808,那么可以如下方式走代理:
git config http.proxy socks5://127.0.0.1:10808
git config https.proxy socks5://127.0.0.1:10808
查看当前代理
git config http.proxy
git config https.proxy
取消代理
git config --unset http.proxy
git config --unset https.proxy
如果需要把代理应用到全局,加上参数 --global
即可