多个存储库的相同权限
Same permissions for multiple repositories
我有 2 个 git 存储库,它们的权限看起来与此类似:
repo myrepo
RW+ = admin
RW user1$ = user1
RW user2$ = user2
RW user3$ = user3
RW user4$ = user4
用户数量相当高(目前约 100 个)并且还在增长。为了避免维护两个列表的权限,我想知道回购协议之间是否存在某种继承或用户循环
有可能(我尝试搜索 http://gitolite.com/gitolite/#documentation 和 Whosebug)
那么是否可以做一些类似配置的事情 repo2
具有与 repo1
相同的权限 and/or 在循环中执行每个 user/branch 的权限?
至少,首先要考虑的是用户组的概念:您可以在两个 repo 中使用一个组,并为该组更新一次用户列表。
@developers = user1 user2 user3
repo myrepo
RW+ = admin
RW = @developer
repo myrepo2
RW+ = admin
RW = @developer
之后,为了 真正 规模,您可以定义该组以便从 user referential like LDAP.
自动获取其内容
GROUPLIST_PGM => '/home/git/bin/ldap-query-groups',
您将不再需要修改 gitolite-admin
存储库。
what I need is that everyone in the group gets their own branch (with branch name == user name).
那叫"personal" branches in Gitolite:
"personal" branches are great for environments where developers need to share work but can't directly pull from each other (usually due to either a networking or authentication related reason, both common in corporate setups).
Personal branches exist in a namespace of their own. The syntax is:
RW+ personal/USER/ = @userlist
where the "personal
" can be anything you like (but cannot be empty), and the "/USER/
" part is necessary (including both slashes).
A user "alice
" (if she's in the userlist) can then push any branches inside personal/alice/
(i.e., she can push personal/alice/foo
and personal/alice/bar
, but NOT personal/alice
).
为了补充@VonC 的出色回答,您还可以对您的存储库进行分组。
@developers = user1 user2 user3
@cust1repos = myrepo myrepo2
repo @cust1repos
RW+ = admin
RW = @developer
这基本上是这里的第一个例子http://gitolite.com/gitolite/conf/
我有 2 个 git 存储库,它们的权限看起来与此类似:
repo myrepo
RW+ = admin
RW user1$ = user1
RW user2$ = user2
RW user3$ = user3
RW user4$ = user4
用户数量相当高(目前约 100 个)并且还在增长。为了避免维护两个列表的权限,我想知道回购协议之间是否存在某种继承或用户循环 有可能(我尝试搜索 http://gitolite.com/gitolite/#documentation 和 Whosebug)
那么是否可以做一些类似配置的事情 repo2
具有与 repo1
相同的权限 and/or 在循环中执行每个 user/branch 的权限?
至少,首先要考虑的是用户组的概念:您可以在两个 repo 中使用一个组,并为该组更新一次用户列表。
@developers = user1 user2 user3
repo myrepo
RW+ = admin
RW = @developer
repo myrepo2
RW+ = admin
RW = @developer
之后,为了 真正 规模,您可以定义该组以便从 user referential like LDAP.
自动获取其内容GROUPLIST_PGM => '/home/git/bin/ldap-query-groups',
您将不再需要修改 gitolite-admin
存储库。
what I need is that everyone in the group gets their own branch (with branch name == user name).
那叫"personal" branches in Gitolite:
"personal" branches are great for environments where developers need to share work but can't directly pull from each other (usually due to either a networking or authentication related reason, both common in corporate setups).
Personal branches exist in a namespace of their own. The syntax is:
RW+ personal/USER/ = @userlist
where the "
personal
" can be anything you like (but cannot be empty), and the "/USER/
" part is necessary (including both slashes).A user "
alice
" (if she's in the userlist) can then push any branches insidepersonal/alice/
(i.e., she can pushpersonal/alice/foo
andpersonal/alice/bar
, but NOTpersonal/alice
).
为了补充@VonC 的出色回答,您还可以对您的存储库进行分组。
@developers = user1 user2 user3
@cust1repos = myrepo myrepo2
repo @cust1repos
RW+ = admin
RW = @developer
这基本上是这里的第一个例子http://gitolite.com/gitolite/conf/