git如何设置代理提升githubclone速度

本篇文章为大家展示了git如何设置代理提升github clone速度,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

创新互联专注于博兴网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供博兴营销型网站建设,博兴网站制作、博兴网页设计、博兴网站官网定制、微信小程序定制开发服务,打造博兴网络公司原创品牌,更为您提供博兴网站排名全网营销落地服务。

github在国内访问速度很慢,clone一个项目的速度就10多k每秒,下面是我clone公司维护的spark的速度.

git如何设置代理提升github clone速度

设置代理之后.

git如何设置代理提升github clone速度

速度提升了很多.

1. 设置代理

前提是你有一个速度比较快的代理.

# git clone http://...

git config --global http.proxy socks5://127.0.0.1:1080

# git clone https://...

git config --global https.proxy socks5://127.0.0.1:1080

# git clone git://...

git config --global core.gitproxy socks5://127.0.0.1:1080

端口是你自己的情况而定,一般默认8080,我的设置为11091

git如何设置代理提升github clone速度

2. 取消代理

git config --global --unset http.proxy

git config --global --unset https.proxy

git config --global --unset core.gitproxy

如果之前设置过代理,或想取消代理可以使用这几个命令

3. 使用https clone时遇到HttpReQuestException encoutered && repository not found问题

Github 禁用了TLS v1.0 and v1.1,必须更新Windows的git凭证管理器。

https://github.com/microsoft/Git-Credential-Manager-for-Windows/releases

找到最新的releases版本,下载安装

上述内容就是git如何设置代理提升github clone速度,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。


分享标题:git如何设置代理提升githubclone速度
文章路径:http://myzitong.com/article/pscpgc.html