19

I am trying to clone my repository using ssh from bitbucket but whenever i clone the repository i get:

Connection to bitbucket.org closed by remote host.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

During cloning repositories of small size it gets cloned but when cloning bigger size repositories gives the error. I also have tried this method:

fatal: early EOF fatal: index-pack failed

but no luck. Could any one help with the issue?

Note:

Http cloning works fine, but that doesn't work in my scenario. I need to clone using only ssh.

Community
  • 1
  • 1
PaladiN
  • 4,246
  • 7
  • 35
  • 63
  • You can check the help at http://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed – pedrorocha Dec 27 '16 at 17:32
  • Possible duplicate of [fatal: early EOF fatal: index-pack failed](http://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed) – Jannie Theunissen Mar 15 '17 at 13:56
  • 2
    @JannieT as I have already told the method doesn't work. How does it becomes duplicate of that issue?? Also this post has been here for almost 6 months from now.. – PaladiN Mar 15 '17 at 14:00
  • I suspect you are having network issues. Your paste of the output is missing parts. How far did it get with `Receiving objects`? What was the download speed before it stoped? To find out if it is a network issue: Does this work on another network? Does it work to download big files from Bitbucket, e.g. the zip file of the repo content? Does downloading big files from elsewhere work? – Jan Zerebecki May 07 '17 at 17:05
  • Try adding `GIT_TRACE_PACKET=1` to the front of your clone command: `GIT_TRACE_PACKET=1 git clone ...`. This will print extra information about what is happening at the network level and may give some insight into what is actually failing. – John Szakmeister Sep 14 '17 at 17:11
  • any solution so far? I'm in the same stage and https://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed didn't work for me either? – Chetan Jan 26 '21 at 18:02

4 Answers4

1

I fix this issue running: "git fetch origin"

Joel Estramil
  • 305
  • 3
  • 9
0

I solved it by using following command in linux.

git fetch origin
git pull origin master
Ahmad Sharif
  • 3,799
  • 5
  • 35
  • 47
-1

Run git config --global core.compression 9 before git clone git@bitbucket.org:******/*******.git

RASEL RANA
  • 2,063
  • 1
  • 14
  • 17
-3

check this https://confluence.atlassian.com/bitbucketserverkb/git-push-fails-fatal-the-remote-end-hung-up-unexpectedly-779171796.html

git config --global http.postBuffer 157286400

git clone <repository>
g00glen00b
  • 38,039
  • 13
  • 89
  • 120
Rodazzzz
  • 1
  • 1