Remote: error: insufficient permission for adding an object to repository database objects

If you push code to a git repo, you might get this error :

remote: error: insufficient permission for adding an object to repository database objects
remote: fatal: failed to write object

Make sure that the system permissions are set properly. Stackoverflow provides some good troubleshooting steps.

The commands below solve the issue :

cd /path/to/repo.git
chgrp -R groupname .
chmod -R g+rwX .

git config core.sharedRepository true
 

For groupname, make sure it matches the user account details that you use for logging in and pushing code to the git server.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s