git_clone提速
此文转载自:
https://blog.csdn.net/havedoor/article/details/83350768
1. host重定向
通过http://tool.chinaz.com/dns
寻找github.com
最高效地址,就是TTL
最短的IP
地址。
寻找
github.com
的TTL
最短的IP
地址寻找
github.global.ssl.fastly.net
的TTL
最短的IP
地址配置
hosts
vim /etc/hosts
13.229.188.59 github.com 31.13.83.8 github.global.ssl.fastly.net
2. 通过码云中转
在码云上新建一个项目,然后选“导入已有项目”,把github
上要clone
的工程放进去,一般需要十几分钟完成创建。
3. 通过代理方式
这种方式需要有VPN
代理,本人使用的是Lantern
收费版的,感觉甚是不错。
查看自己
VPN
的proxy
端口- 点击Lantern的显示蓝灯,如下所示:
- 弹出浏览器页面,在地址栏可以看到代理端口,如下所示:
设置代理(只针对
github
)
git config --global http.http://github.com.proxy 127.0.0.1:51181
git config --global https.https://github.com.proxy 127.0.0.1:51181
- 删除代理
git config --global --unset http.http://github.com.proxy
git config --global --unset https.https://github.com.proxy
- 查看
Git
全局配置
git config --global --list
本博客所有文章除特别声明外,均采用 CC BY-SA 3.0协议 。转载请注明出处!