Firebird News

Tuesday, October 20, 2009

git insufficient permission for adding an object to repository database ./objects

this is a shared group repository
so i had to enter the repository dir and make sure group can write into it

ssh to server
cd repository.git

sudo chmod -R g+ws *
sudo chgrp -R mygroup *

git repo-config core.sharedRepository true

and the try to push origin master again

14 comments:

Xmariachi said...

Hey,
I still cannot make it work.

This is my config file on the repo:

[core]
repositoryformatversion = 0
filemode = true
bare = true
sharedRepository = true
[receive]
denyNonFastforwards = true

and when I "git push", I get the following:

Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 294 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database ./objects

fatal: failed to write object
error: unpack failed: unpacker exited with error code
...

I have created a git user and group for the repo, and then normal users need to be added to the git group to use it and that's it.

Could you please help with this? Thanks a lot


PS. I'm working locally, but that shouldn't make a difference.

mariuz said...

check the permissions for object files
so that others have rights inside the repository

git group should be rw

ls -lah .git/objects

JF said...

Worked beautifully.

JF said...

This fixed my issue.

cbulock said...

Thanks! This fixed this for me as well.

C said...

thanks! it worked for me too

afilis said...

thanks! it works

Matsukubokkuri said...

Great example!

Matsukubokkuri said...

Great article.
I didn't set chgrp so the error message didn't disappear.

Marcus said...

great article, no I can look relaxed to the weekend

Marcus

Joe said...

That'll do. Thank you!

vignesh rajesh said...

even i have the rw option in my account still this is not work for me

vignesh rajesh said...

insufficient permission for adding an object to repository database ./obj

even i have the rw option in my account but still have the problem

AmitSpeedo said...

Worked for me too