Git 遇到了 The remote end hung up unexpectedly -- early EOF -- index-pack failed 问题

Git 遇到了 The remote end hung up unexpectedly – early EOF – index-pack failed 问题

今天想 clone 在 gitlab 的 repo,结果在 clone 的过程中遇到了下面的错误。
$ git clone -v git://192.168.8.5/butterfly025.git
Cloning into ‘butterfly025’…
remote: Counting objects: 4846, done.
remote: Compressing objects: 100% (3256/3256), done.
fatal: read error: Invalid argument, 255.05 MiB | 1.35 MiB/s
fatal: early EOF
fatal: index-pack failed

解决方案

https://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed

First, turn off compression:

git config --global core.compression 0

Next, let’s do a partial clone to truncate the amount of info coming down:

git clone --depth 1 

When that works, go into the new directory and retrieve the rest of the clone:

git fetch --unshallow 

or, alternately,

git fetch --depth=2147483647

Now, do a regular pull:

git pull --all

I think there is a glitch with msysgit in the 1.8.x versions that exacerbates these symptoms, so another option is to try with an earlier version of git (<= 1.8.3, I think).

你可能感兴趣的:(Git 遇到了 The remote end hung up unexpectedly -- early EOF -- index-pack failed 问题)