Why is cloning from github so slow

时间:2019-04-17 02:18:07

标签: git

Pulling a repo from github and it is very, very slow and I can't work out why.

C:\projects>git clone --depth 1 git@github.com:sawilde/opencover.git
Cloning into 'opencover'...
The authenticity of host 'github.com (192.30.255.112)' can't be established.
RSA key fingerprint is SHA256:nThbg........................................
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.
remote: Enumerating objects: 1459, done.
remote: Counting objects: 100% (1459/1459), done.
remote: Compressing objects: 100% (829/829), done.
Receiving objects:  95% (1388/1459), 14.09 MiB | 8.00 KiB/s

I've tried a few things e.g. windows and ubuntu (via windows subsytem), full vs shallow clone, ssh vs https, ... etc, and I get the same slow behaviour; 30mins to get to 14MiB? I don't recall it being this bad.

Very frustrated as I get good speeds on general downloads and not sure why it is this slow to clone a repo...

2 个答案:

答案 0 :(得分:2)

Likely a temporary routing issue on the service provider's end, but GitHub has a debug site where you can run a few tests and then send them the outputs for further investigation. The site can be found here:

https://github-debug.com/

答案 1 :(得分:0)

从使用 ssh 切换到 https 为我做到了。