Git clone: The remote end hung up unexpectedly


Continue with my previous blog BitBucket Server Unreachable When Merge Pull Request, I tried to clone the large repository to my local laptop to do some analysis. But it always ended up with this error:

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

So basically the issue is caused by the large size. There are three options you can try:

Option 1: If you git from https site, then increase http.postBuffer (count in bytes) to a larger size. The following example set it to 1000M. The git clone may still fail if the repository is too large.

git config --global http.postBuffer 1048576000

Option 2: Use ssh. Something like

git clone ssh://user@server

Option 3: If you only need the current version, then you can try shallow clone as well.

git clone --depth=1 https://user@server

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s