Java Ninja Chronicles By Norris Shelton

Things I learned in the pursuit of code

When we originally started with Git, we were having trouble with other people being able to use the repository.

9:07:37 AM Push failed
           remote: error: insufficient permission for adding an object to repository database ./objects        
           error: unpack failed: unpack-objects abnormal exit
           error: failed to push some refs to 'norris.shelton@'

How to make a Git repo shareable

git config core.sharedRepository

Look for the following in the output
group or true or 1 or some mask

If not, then run the following (may have to be root)

git config core.sharedRepository group

Then run the following to set the owner, group to whatever you need

sudo chown -R appbuilder:developers *
sudo chmod -R g+rw *

To avoid this problem, type the following to create the repository as a shared repo

git init --shared repository_name.git

November 14th, 2013

Posted In: Git

One Comment

  • Mike Barnes says:

    –shared did not work for us. We had to create it using just –bare, then follow the instructions in your blog. Finally, we had to run the following command:
    sudo chmod -R +t igs.git/

Leave a Reply

Your email address will not be published. Required fields are marked *

LinkedIn Auto Publish Powered By :