Git使用vpn代理加速pull
- 开了 VPN 之后使用 Git 连接 github 的 clone pull push 命令依旧很慢,是由于 git 默认不使用代理导致,配置 git 代理后可提升速度。
1. 配置Git代理
- 打开Git bash窗口输入以下命令
1
2
3
4
5
6
7windows系统
git config --global http.proxy http://127.0.0.1:{port}
git config --global https.proxy http://127.0.0.1:{port}
或
MacOS系统
git config --global http.proxy socks5://127.0.0.1:{port}
git config --global https.proxy socks5://127.0.0.1:{port}
2. 查询Git代理
1 | git config --global --list |
3. 取消Git代理
1 | git config --global --unset http.proxy |
评论
