gitcygwinmsysgit

fatal: early EOF fatal: index-pack failed


I have googled and found many solutions but none work for me.

I am trying to clone from one machine by connecting to the remote server which is in the LAN network.
Running this command from another machine cause error.
But running the SAME clone command using git://192.168.8.5 ... at the server it's okay and successful.

Any ideas ?

user@USER ~
$ 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

I have added this config in .gitconfig but no help also.
Using the git version 1.8.5.2.msysgit.0

[core]
    compression = -1

Solution

  • 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 <repo_URI>
    

    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).