Question

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!

Was it helpful?

Solution

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.

:-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top