Written by Sean Behan on Sun Jun 17th 2012

If you are having permission problems using git, such as

error: insufficient permission for adding an object to repository database ./objects
There are a couple thing you can do to remedy the situation, before moving to a full on git server like gitosis.

Create your users and add them to a group. Create (if you haven't already) your git repo on the server and change permission and ownship and set the git config sharedRepository to true.

Here are all the commands, quick and dirty!

adduser sean
adduser jackson
groupadd developers
adduser sean developers
adduser jackson developers

mkdir -p /git/dev/app.git cd /git/dev/app.git git --bare init vim description #edit this file (mac os x complains otherwise) chmod -R g+ws chgrp -R developers git repo-config core.sharedRepository true

Found from: http://mapopa.blogspot.com/2009/10/git-insufficient-permission-for-adding.html


Tagged with..
#adduser #developers #development #groupadd #Linux #mac os x #repo #shared #ssh #Git

Just finishing up brewing up some fresh ground comments...