Make a GIT repository read only for some users using gitosis
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 impossible to push after add
- jekyll GitHub Metadata error
- Remove files from master at github
- Git repository not updating
- using git post-receive for overwriting files in multiple directories
- gitweb reports “404 - No projects found” on Ubuntu 14.04.2
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?
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