5

This error first appear when I tried to pull, so I had remove my project and now when I try to clone I am receiving the same error.

$ git clone
remote: error: Could not read 5011270a43365eb58ad54d4caed71fcbc64e845d
remote: fatal: bad tree object 5011270a43365eb58ad54d4caed71fcbc64e845d
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header 
rderoldan1
  • 3,517
  • 26
  • 33
  • possible duplicate of [git clone error : fatal: git upload-pack: aborting due to possible repository corruption on the remote side](http://stackoverflow.com/questions/8691916/git-clone-error-fatal-git-upload-pack-aborting-due-to-possible-repository-co) – Christopher Oct 07 '13 at 21:03
  • After googling a couple hours I found several similar errors, but all are related with git-upload-pack, so your "amazing answer" doesn't work for me – rderoldan1 Oct 07 '13 at 21:08

1 Answers1

4

The other case where I have seen that error message in non-git upload-pack context (as opposed to my previous answer) is in this thread:

GitHub has a bug where, if someone submits a pull request to a project, and then that entry is deleted (I don't know if it's that they just delete a pull request, or they delete their fork/account, but something), then you get these stale references.
Somewhere on GitHub, there's a support thread for this.

If that upstream repo you are cloning isn't a Github repo, and if you have access to said upstream repo, then a git fsck or git fsck --lost-found could help.


Since it is a GitHub repo, the OP rderoldan1 took the right action and wrote to GitHub support, and reports in the comments:

they respond me:
"We've found the cause of the problem, and are just working to resolve it.
It appears that the Git repository on the file server has been corrupted and requires a bit of manual wire uncrossing. Rest assured, our systems team is looking into it, and hope to have an update for you soon."

rderoldan1 reports the result from GitHub:

Today 9 oct, Jeff King send me and email, and now mi git is working :D, here is his message, thanks to @VonC and GitHub staff

The problem with your repository is fixed.
One of the objects from a pull-request's test-merge was missing on our end, causing git to complain. This is due to a bug on our end that we're still tracking down.
In the meantime, I've restored the missing object, and the repository should be in good shape now.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • As you describe, the error appeared after I accept a pull request in my upstream project. git fsck show me 4 dangling commits, but I can't solve this issue, did you know other solution. – rderoldan1 Oct 07 '13 at 22:10
  • 1
    @rderoldan1 you can check out http://stackoverflow.com/q/14448326/6309 or http://stackoverflow.com/q/4254389/6309 as example of tentative recovery. – VonC Oct 08 '13 at 06:33
  • I wrote Github, and they respond me "We've found the cause of the problem, and are just working to resolve it. It appears that the Git repository on the file server has been corrupted and requires a bit of manual wire uncrossing. Rest assured, our systems team is looking into it, and hope to have an update for you soon." – rderoldan1 Oct 09 '13 at 01:38
  • 1
    @rderoldan1 great. I have aded your comment in the answer for more visibility, and to illustrate that, in this case, only the ones having access to the repo on the server can fix said repo. – VonC Oct 09 '13 at 06:07
  • 1
    @rderoldan1 sorry for the rejected edit: I have include what you proposed (http://stackoverflow.com/review/suggested-edits/3102624) in the answer. – VonC Oct 14 '13 at 06:34