Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git 'failed to read object' and 'unable to find' errors

Tags:

git

gitolite

For some reason I'm getting commit errors suddenly for merges that happend several months ago? Using Gitolite to push to a central server, and git flow extensions locally. The errors are:

git push:

fatal: failed to read object 02a261fad3eae408b04d1941334875d73ddd3f57: Permission denied
error: unpack failed: unpack-objects abnormal exit

And I can't find that object locally or on the server

git pull:

error: unable to find 379d1971a1037a97919ce37342ee7a60fc611946
error: unable to find 6e41daf37591c88c8dc18f2ecc8761e7d44a0cd9
error: unable to find 0995f5098e0a96f642c6730231d997dd6e074697

ok how about trying a fresh git clone:

error: unable to find 379d1971a1037a97919ce37342ee7a60fc611946
error: unable to find 6e41daf37591c88c8dc18f2ecc8761e7d44a0cd9
error: unable to find 0995f5098e0a96f642c6730231d997dd6e074697
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: fatal: failed to read object 6e41daf37591c88c8dc18f2ecc8761e7d44a0cd9: Permission denied
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

Any idea what might be happening to cause these errors to appear? Or more importantly how to undo them?

EDIT: Also after commit 6e41daf37 I did a 'git flow feature start blah' and commited existing changes to that instead of breaking develop. Maybe an issue with the feature being on local but not the Gitolite server? In any case I can't 'feature publish' because it gives the 'unpack failed to read object 02a261fad3' error posted above

like image 521
xref Avatar asked Jan 30 '26 20:01

xref


2 Answers

That happens to me as well. Seems some files gets wrong permissions in the repository on server. Following two commands did the trick:

cd /path/to/gitolite
chown -R git *
like image 140
Dima Avatar answered Feb 01 '26 09:02

Dima


Since as the kids say this looks 'gnarly', i'm pretty sure kids still say that, I just restored the Gitolite repo from a backup and everything works great now. No idea what happened but here is a fantastic example of why we make backups!

like image 37
xref Avatar answered Feb 01 '26 11:02

xref



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!