The remote end hung up unexpectedly while git clon

2019-01-01 03:07发布

My git client repeatedly fails with the following error after trying to clone the repository for some time.

What could be the issue here?

Note: I have registered my SSH key with the GIT hosting provider

Receiving objects:  13% (1309/10065), 796.00 KiB | 6 KiB/s
fatal: The remote end hung up unexpectedly

标签: git
27条回答
君临天下
2楼-- · 2019-01-01 03:26

I got solution after using below command:

git repack -a -f -d --window=250 --depth=250

查看更多
高级女魔头
3楼-- · 2019-01-01 03:26

The only thing that worked for me was to clone the repo using the HTTPS link instead of the SSH link.

查看更多
人间绝色
4楼-- · 2019-01-01 03:28

I got the same issue, I fixed this with trial and error method. I changed the core.compression value until it works.

I started with "git config --global core.compression 1" after 3 attempts

"git config --global core.compression 4" worked for me.

查看更多
弹指情弦暗扣
5楼-- · 2019-01-01 03:29

Check your internet speed. Also check the following commands:

$ git config --global http.postBuffer 2M
$ git pull origin master
查看更多
与风俱净
6楼-- · 2019-01-01 03:31

This worked for me, setting up Googles nameserver because no standard nameserver was specified, followed by restarting networking:

sudo echo "dns-nameservers 8.8.8.8" >> /etc/network/interfaces && sudo ifdown venet0:0 && sudo ifup venet0:0
查看更多
裙下三千臣
7楼-- · 2019-01-01 03:32

None of the above worked for me, but here's what did: https://stackoverflow.com/a/22317479

The complete error message I'd been receiving was:

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
查看更多
登录 后发表回答