Khoi Ngo
Khoi Ngo

Reputation: 1441

Pull large repository (more than 1GB size) over http fail

The repository's size is over 1GB, when i pull up to 50%, error occurred:

> remote: Counting objects: 23891, done. remote: Compressing objects:
> 100% (19980/19980), done. fatal: The remote end hung up
> unexpectedly3.61 MiB | 333 KiB/s    fatal: early EOF fatal: recursion
> detected in die handler

Can anybody help me, please?

Upvotes: 3

Views: 5844

Answers (2)

Prof.Chaos
Prof.Chaos

Reputation: 1045

I also agree with isherwood that it's most likely a copy of StackOverflow: GitHub Clone Error: Cannot clone with EOF error, however that entry was very disappointing for me (at the time there was just one response, which did not help me).

I resolved it with the following steps (found on the internet, not on StackOverflow)

  1. git clone --depth 1 YOUR-URL-TO-CLONE ./
  2. git fetch --unshallow
  3. git pull

For more information about the meaning of 1., i.e., a shallow clone, see StackOverflow: Is it safe to shallow clone with --depth 1, create commits, and pull updates again?

For more information about the meaning of 2., see StackOverflow: https://stackoverflow.com/questions/6802145/how-to-convert-a-git-shallow-clone-to-a-full-clone.

Regarding 3: This is, I believe, just to double-check. At least for me that did not bring me any updates.

Upvotes: 4

gmarintes
gmarintes

Reputation: 1308

It will most likely fail due to the size of your repository.

If you have access to the remote repository, try this:

  1. Get a copy of the remote repository files. You can tar.gz the remote repository directory and download it to your local machine.
  2. Unzip the remote repository somewhere in your local machine.
  3. Clone the repository from your machine (no file downloading here so it should work)

    git clone /path/to/where/you/unzipped/the/remote/repository your_local_copy

  4. Edit the .git/config file you can find inside 'your_local_copy' directory

  5. Edit the value of the 'url' key just below the [remote "origin"] line.

    [remote "origin"]

    url = git+ssh://youruser@yourrepositoryhost/srv/git/yourrepository.git

  6. Your local repository will now point to the remote repository and should work as expected.

  7. Remove the copy of the remote repository you made in Step 2.

Upvotes: 1

Related Questions