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