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

  • Home
  • SEARCH
  • 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 9090045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:17:09+00:00 2026-06-16T22:17:09+00:00

I use a bare repository where multiple devs can push. As suggested, I used

  • 0

I use a bare repository where multiple devs can push.

As suggested, I used sharedRepository = true to tell git to give a group of users the permission to push.

When I want to add pushers, I simply add them the required group as secondary group (sudo adduser the_pusher the_required_group)

When devs push, I see the files created in objects directory created with the good permission but not the good group.

Example:

$ ls -l repository/objects
...
drwxrwsr-x 2 pusher1 pusher1 4096 janv.  7 14:13 fa
drwxrwsr-x 2 pusher1 pusher1 4096 déc.  26 15:29 fc
drwxrwsr-x 2 pusher1 pusher1 4096 déc.  11 12:41 fd
...

As you can see, the attached group is the primary group of pusher1

How can I make git to attach these objects to the_required_group instead ?


Update

I use git over ssh.
Each dev have his own ssh account.

  • 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-06-16T22:17:10+00:00Added an answer on June 16, 2026 at 10:17 pm

    My team has fixed this by setting the s option on all directories in the repository with chmod To do this chown and chgrp the files and directories to the correct user/group then chmod g+s everything in the repository.

    The +s causes new files to have the group of their parent directory. Taken from man 2 chown

    • If the file system is mounted with -o nogrpid and the set-group-ID bit is
      enabled on the parent directory, then the group of a new file is made the same
      as that of the parent directory.

    See also, man chmod and man 2 chmod

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

Sidebar

Related Questions

I have a bare git repository that I use to push to and pull
I have created a remote bare repository: cd ~ mkdir -p git/foto-fiori.git cd git/foto-fiori.git
I already have a local workig space repository in /applications/mamp/htdocs/myproject/.git and i can't figure
I have set up a git repository on my local machine and a bare
I have a Git repository. I have cloned the repository and can commit my
I have a bare repository on my home-server to which I push from my
I'm trying to synchronize periodically a git bare repository, my local branches are created
I have hosting that give me ssh access. I created bare repository. Where I
We have a central svn repository and are starting to have people use git
Here is the problem: I created bare git repository at my hosting partner place,

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.