I have a error Early EOF's (Index-Pack Failed) when I try to clone a project from a repository git.
But when I do a git-pull
or git-push
from my localhost to the repository, I have no problems.
The error gives me the message that the repository is corrupt. It's weird.
What factors can cause such errors? Does the server, where is the repository, has low memory?
"Clone depth" is a feature of git to reduce server load: Instead of cloning the complete repository (as usually done with git), using clone depth just clones the last clone-depth-number revisions of your repository. In literature this is also called "shallow clone"
The default is 1MB.
Git provides a fetch --unshallow command which solves the problem, so we just need to run git fetch --unshallow in the repository before running r10k. However, some of our (older) GitLab installs don't make shallow clones. Instead, they make full clones with a single detached branch, so we need fetch --all instead.
git clone fails with “index-pack” failed? will list the most common causes for this error.
But note the current Cygwin version (if that is what you are using) has an issue with git when cloning over ssh.
Depending on the server executing the git clone request, you also have issue when cloning over ssh via git protocol.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With