前言 {#前言}
很少拉取超过几个 GB 的仓库,但最近就是有这个需求,需要从 GitHub 拉取一个存放 PDF 的仓库,PDF 源文件小的有几 MB,大的有几十 MB,一个仓库大概有 3GB 左右,在启用全局代理的情况下,拉取速度还是很慢,保持在几十 KB 左右,换成 Git 代理来操作。
添加 https 和 htpp 代理 {#添加 -https- 和 -htpp- 代理}
$ git config --global https.proxy http://127.0.0.1:1080
$ git config --global https.proxy https://127.0.0.1:1080
# 只对 github.com 生效(未测试)`
$ `git` config `--global` http.https://github.com.proxy socks5://127.0.0.1:1080`
取消代理 {#取消代理}
$ git config --global --unset http.proxy
`$ `git` config `--global` `--unset` https.proxy`
效果图 {#效果图}
添加完代理下载这个仓库大概 3 分钟左右搞定。
效果还是很理想的!