[Solved] git push: “error: insufficient permission for adding an object to repository database ./objects”
Yeah, I know, this thing has been on here before, I’ve seen the questions.
git push gives me this:
error: insufficient permission for adding an object to repository database ./objects
I have just one question: Is this error regarding the local or the server-side repository database?
And why am I the only one getting this error among the developers?
(I’m asking this question because my server guy doesn’t want to believe me that this is a server-side problem)
Alright, here’s the long version:
Two users have pulled a rep into their workspace.
- User 2 pushes some change.
- User 1 changes something, commits, then pulls the change of User 2 to be merged.
-
User 1 tries to push, but gets this:
git.exe push –progress “origin” dev:dev
Counting objects: 18, done.
Compressing objects: 100% (10/10)
Writing objects: 100% (10/10)
Writing objects: 100% (10/10), 870 bytes, done.
Total 10 (delta 6), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database ./objectsfatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To [email protected]:twf
! [remote rejected] dev -> dev (n/a (unpacker error))
error: failed to push some refs to ‘[email protected]:twf’git did not exit cleanly (exit code 1)
Solution #1:
Perhaps I didn’t get your question, but… you’re right, of course, there are several questions asked here about exactly the same. Let’s check this one, for example:
Usually this problem is caused by wrong user and group permissions on
your git servers file-system.
UPDATE: anyway, it’s actually quite easy to make the check who is to blame – your local environment or the server’s one. Let some other developer (but not user 2!) to make exactly the same update that you did (update the same files you did; it won’t be too hard, considering your report), then try to git push
these updates from his/her machine.