Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6065257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:22:13+00:00 2026-05-23T09:22:13+00:00

When I try to push to a shared git remote, I get the following

  • 0

When I try to push to a shared git remote, I get the following error:
insufficient permission for adding an object to repository database

Then I read about a fix here: Fix This worked for the next push, since all of the files were of the correct group, but the next time someone pushed up a change it made a new item in the objects folder that had their default group as the group. The only thing I can think of is to change all of the developer’s default group for items they check in, but that seems like a hack. Any ideas? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:22:13+00:00Added an answer on May 23, 2026 at 9:22 am

    Repair Permissions

    After you have identified and fixed the underlying cause (see below), you’ll want to repair the permissions:

    cd /path/to/repo/.git
    sudo chgrp -R groupname .
    sudo chmod -R g+rwX .
    sudo find . -type d -exec chmod g+s '{}' +
    

    Note if you want everyone to be able to modify the repository, you don’t need the chgrp and you will want to change the chmod to sudo chmod -R a+rwX .

    If you do not fix the underlying cause, the error will keep coming back and you’ll have to keep re-running the above commands over and over again.

    Underlying Causes

    The error could be caused by one of the following:

    • The repository isn’t configured to be a shared repository (see core.sharedRepository in git help config). If the output of:

       git config core.sharedRepository
      

      is not group or true or 1 or some mask, try running:

       git config core.sharedRepository group
      

      and then re-run the recursive chmod and chgrp (see "Repair Permissions" above).

    • The operating system doesn’t interpret a setgid bit on directories as "all new files and subdirectories should inherit the group owner".

      When core.sharedRepository is true or group, Git relies on a feature of GNU operating systems (e.g., every Linux distribution) to ensure that newly created subdirectories are owned by the correct group (the group that all of the repository’s users are in). This feature is documented in the GNU coreutils documentation:

      … [If] a directory’s set-group-ID bit is set, newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set-group-ID bit of the parent directory. … [This mechanism lets] users share files more easily, by lessening the need to use chmod or chown to share new files.

      However, not all operating systems have this feature (NetBSD is one example). For those operating systems, you should make sure that all of your Git users have the same default group. Alternatively, you can make the repository world-writable by running git config core.sharedRepository world (but be careful—this is less secure).

    • The file system doesn’t support the setgid bit (e.g., FAT). ext2, ext3, ext4 all support the setgid bit. As far as I know, the file systems that don’t support the setgid bit also don’t support the concept of group ownership so all files and directories will be owned by the same group anyway (which group is a mount option). In this case, make sure all Git users are in the group that owns all the files in the file system.

    • Not all of the Git users are in the same group that owns the repository directories. Make sure the group owner on the directories is correct and that all users are in that group.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try and push a change I've commited, I get the following error
I am getting the following error when I try to push my app to
I'm getting an odd error when I try to push to a new remote
On Mac OS X Lion 10.7.2 when i try to push to remote repository
When I try to push to a remote git branch to delete it with
What does it mean when you try to push to a Mercurial repository on
What would possibly cause a 'git push' to try and commit to two branches?
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
When I try to push a view controller to my UINavigationController I get a
I give up! Whenever I try to push I get a stupid: ! [rejected]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.