提高 git 访问 github 速度
网络代理前提:
- 请开启代理(梯子)
- 检查代理端口(可能会有所不同)
文章目录
- 1. git 配置参数列表命令:
- 2. git 添加 http 代理
- 3. git 取消 http 代理
1. git 配置参数列表命令:
git config --list
2. git 添加 http 代理
两个http 差别不大,只是增加(或减少)一个字母
s。
选择下面其中一个就可以。
- http / https 代理
根据 http 端口设置,我这里端口为 10809:
git config --global http.proxy http://127.0.0.1:10809
git config --global https.proxy https://127.0.0.1:10809
- socks 代理
根据 socks 端口设置,我这里端口为 10808
git config --global http.proxy 'socks5://127.0.0.1:10808'
git config --global https.proxy 'socks5://127.0.0.1:10808'
3. git 取消 http 代理
git config --global --unset http.proxy
git config --global --unset https.proxy
参考
- git 设置网络代理,修改http.proxy
附录
我的代理端口截图如下:



![Java并发编程(六)线程池[Executor体系]](https://img-blog.csdnimg.cn/c949d95312e44bc99e8a0d016a79a218.png)











![[PyTorch][chapter 50][创建自己的数据集 2]](https://img-blog.csdnimg.cn/b28ab32903b142b8ac5f78fb0ea35d87.png)



