using gitosis for GIT
I want user A and B to have clone, push and p开发者_开发百科ull while user C can only do clone and pull (no push)
How do I do that?
git-dameon
is used for public access. But you can use gitosis to grant read-only access to a particular group of users. For instance:
[group thegood]
writable = myRepo
members = A B
[group thebad]
readonly = myRepo
members = C
[repo myRepo]
description = "my project"
See example.conf for more information.
Gitosis can't limit write access to repository. If user is in members
list then it has all read/commit rights.
Original documentation mentions that in such case just setup a git-daemon
instance to repositories:
sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all
精彩评论