Fixing Git Clone “Early EOFs” Fatal Error

The “git clone” authority – as a name advise – allows we to transcribe an whole repository from remote to local, or clamp versa. Although it is a sincerely elementary and true brazen git command, sometimes, problems might still arise.

Earlier this week, we was strike with an blunder while executing git clone, and a blunder looks like a following:

error: pack-objects died of vigilance 9.20 MiB | 79.00 KiB/s      
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to probable repository crime on a remote side.
remote: aborting due to probable repository crime on a remote side.
fatal: early EOFs:   1% (66/3818), 6.04 MiB | 53.00 KiB/s

After some researching and debugging, here are a dual categorical causes of a deadly error.

1. Slow Internet connection

Cause of error

The repository is outrageous and Internet tie is simply too slow.

This came from my personal knowledge – we was attempting to counterpart a repository of about 1.5Gb. It kept unwell during inconsistently during opposite rate of downloaded %, infrequently after 20Mb, infrequently after 60Mb, 200Mb, etc.

Solution

Changing to a faster and some-more fast Internet tie helps. With a faster connection, we was means to get closer to 1.5Gb. At one indicate I’m means to counterpart but any error.

2. Huge repository

Cause of error

The repository we are perplexing to counterpart is large, in terms of record size. While attempting to counterpart it, a remote server simply doesn’t have adequate memory to cope with a execution.

Solution

Turn of compression. Git counterpart partially. When it is successful, counterpart a rest.

  1. First, spin off Git compression.

    git config --global core.compression 0
  2. Then do a prejudiced counterpart of a repository with --depth 1 parameter. Replace username@domain.com/path/to/git_repo/ with a tangible trail to a repository.

    git counterpart —depth 1 ssh://username@domain.com/path/to/git_repo/
  3. Next, collect a rest of a repository.

    git fetch --unshallow
  4. Finally, finish it adult with a unchanging pull.

    git fetch --unshallow

These methods solved my problem. Hope it helps!

Add Comment