首页 > 其他 > 详细

git clone 很慢

时间:2020-01-10 15:43:55      阅读:85      评论:0      收藏:0      [点我收藏+]

git clone 依然很慢徘徊在20kb/s,

如果你有代理通过https协议下载,不要用 ssh协议下载

1、配置git全局代理,注意你的端口号是不是1080,打开浏览器查看代理里面可以看到代理到ip和端口号

git config --global http.proxy http://127.0.0.1:7891
git config --global https.proxy https://127.0.0.1:7891

2、通过 git config --global -l查看是否配置成功
我的配置如下

http.proxy=socks5://127.0.0.1:7891
https.proxy=socks5://127.0.0.1:7891

3、如何下载
记住通过 https下载,

git clone --depth=1 https://www.github/xxx/xxxx.git

如果项目很大历史很多,记住 加 个 depth=1 参数,
git clone 是 https 因为这个时候走的是http的代理。

Cloning into 'xxxxx'...
remote: Enumerating objects: 1902, done.
remote: Counting objects: 100% (1902/1902), done.
remote: Compressing objects: 100% (1614/1614), done.
remote: Total 1902 (delta 287), reused 1305 (delta 270), pack-reused 0
Receiving objects: 100% (1902/1902), 50.30 MiB | 5.93 MiB/s, done.
Resolving deltas: 100% (287/287), done.
Checking out files: 100% (1835/1835), done.

看到上面结果没?5.93 MiB/s
美滋滋。

git clone 很慢

原文:https://www.cnblogs.com/tonyY/p/12176388.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!