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
Hey,
ReplyDeleteI 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.
check the permissions for object files
ReplyDeleteso that others have rights inside the repository
git group should be rw
ls -lah .git/objects
Worked beautifully.
ReplyDeleteThis fixed my issue.
ReplyDeleteThanks! This fixed this for me as well.
ReplyDeletethanks! it worked for me too
ReplyDeletethanks! it works
ReplyDeleteGreat example!
ReplyDeleteGreat article.
ReplyDeleteI didn't set chgrp so the error message didn't disappear.
great article, no I can look relaxed to the weekend
ReplyDeleteMarcus
That'll do. Thank you!
ReplyDeleteeven i have the rw option in my account still this is not work for me
ReplyDeleteinsufficient permission for adding an object to repository database ./obj
ReplyDeleteeven i have the rw option in my account but still have the problem
Worked for me too
ReplyDelete