git: fatal: index-pack failed

I recently had to clone a very large repository through SSH, every time i did i got this error

 

Cloning into 'large-repository'...
remote: Counting objects: 20248, done.
remote: Compressing objects: 100% (10204/10204), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

I could be the connection is bad , i finally fixed by using the commands below:

$ git clone [email protected]:large-repository --depth 1
$ cd large-repository
$ git fetch --unshallow

Leave a Reply

Your email address will not be published. Required fields are marked *