Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to clone large repo code on git

Tags:

git

I'm getting an error like :-

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
like image 721
Ram Avatar asked Jan 11 '18 05:01

Ram


2 Answers

git config --global http.postBuffer 524288000

git clone repo_url --depth 1

I have followed above steps and finally I have successfully cloned my code.

like image 187
Ram Avatar answered Sep 21 '22 19:09

Ram


That looks like a curl error, typical of a slow internet connection which closes too soon.

As seen here, try a shallow clone (or switch to ssh)

git clone https://[email protected]/weexcel1/higher-education-haryana.g‌​it --depth 1

Even then, as I documented in 2011, you might need to raise the http.postBuffer

git config --global http.postBuffer 524288000

But the idea remains: starting with one commit depth can help.

From there, you can gradually increase the depth:

git fetch --depth=<number-of-commits>

And, after a few iteration:

git fetch --unshallow
like image 25
VonC Avatar answered Sep 24 '22 19:09

VonC