1

I just created a new repo with Gitolite, and another user can successfully clone, commit, push and pull from that.

The repo is brand new and contains one file only. Oddly enough, I can't clone it on my own machine. All I get is what follows:

$ git clone ssh://gitolite@remoteserver/myrepo.git
Cloning into 'myrepo'...

###########
(SSH welcome message here)
###########

fatal: object 44df53e172de1448b139674fefb6ced3b1ddbfcb is corrupted
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How can an object be corrupted in a brand new repo?!? Besides, I'm working with several other repos that I cloned from the very same remote machine, never had a problem like this.

Of course I can start over, create a new repo, copy the file there and go on, but I'd like to understand why this happens.

Thank you!

godzillante
  • 1,174
  • 1
  • 17
  • 32
  • What version of Git was in use? Are the permissions correct? – John Szakmeister May 14 '14 at 11:40
  • git version 1.9.0.msysgit.0 -- permissions are correct for sure – godzillante May 15 '14 at 00:26
  • Hrmph. I see you're using Gitolite as well, which is a fantastic backend. You didn't happen to keep a copy of the repository around, did you? Myself or someone on the Git dev list might be able to do a post-mortem and figure what's wrong. Or at least, what kind of corruption there is which could lead to what happened. – John Szakmeister May 15 '14 at 10:52

1 Answers1

1

I think I have to answer my own question after reading this.

I already had performed a git fsck On the remote repo (myrepo.git directory), no luck. Then I performed a

git fsck --full 44df53e172de1448b139674fefb6ced3b1ddbfcb
git repack

and everything worked again.

Question should stay open, actually, because I can't figure out yet why on earth this could happen.

:-)

Community
  • 1
  • 1
godzillante
  • 1,174
  • 1
  • 17
  • 32