Make a GIT repository read only for some users using gitosis

We are running a GIT repository using gitosis and we need to forbid the push to some people of the team.

So i want everybody have read access to all repositories (got +10 repo and +20 machines where the users can do commit pull and push)

  • Git branching model for two target environments
  • I can't see my remote branch
  • why do it get : when i press git log command
  • subtree merging master into branch: -s recurisve -Xsubtree=?
  • How to clone a Bitbucket repository with Jenkins
  • Undoing a branch merge
  • I need to restrict only the push, i want user can continue doing pull and clone but not push, only 2 users can push to master.

    So any ideas? maybe to ask a password before make push?

  • Git: Merge remote files with local files?
  • pull request to a GitHub project from a forked repo that DOES NOT exist on GitHub
  • git log decoration origin/HEAD
  • .gitignore is ignoring other directories with the same name
  • GIT: How to avoid duplicated commits while maintaining lots of forks?
  • How I can pull the new code from bitbucket?
  • One Solution collect form web for “Make a GIT repository read only for some users using gitosis”

    You do this in the gitosis.conf file. Create two groups, one for those who can write to the repo, and one for those who have read-only access:

    [repo my_repo]
    description = Git repository for foobar
    owner = user1
    
    [group my-repo]
    writable = my_repo
    members = user1 user2
    
    [group readonly]
    readonly = my_repo
    members = user3 user4 user5
    
    Git Baby is a git and github fan, let's start git clone.