gitolite:允许任何 repo RW+CD 的 RW 用户到他们的个人分支,不允许其他人

标签 git gitolite

在 gitolite 中,我想授予所有 write 允许的任何 repo 的用户 RW+CD 到他们的个人分支。换句话说:任何被允许 RW 项目的人都应该被允许创建分支,但只能在他们的个人命名空间中。

我知道我基本上可以这样做:

    repo    some-repo
            RW+CD   = admin
            RW  = foo frob
            R   = bar
            RW+CD dev/USER/ = foo frob #admin

但这意味着我基本上必须为每个存储库复制用户列表。虽然这对于少量 repo 来说是可以的,但一旦 repo 或用户数量增加,它肯定会变得丑陋。

我想过这样的事情:

    repo    @all
            RW+CD dev/USER/ = @all

但这似乎至少为所有 项目的所有 用户提供了读取权限,即使他们在那里没有读取权限也是如此。

最好的解决方案是什么?

最佳答案

一种解决方案是使用 wildcard repo or "wildrepo" 在每个用户的个人存储库中管理这些分支:

详见“user gitolite doc”:

Note that "CREATOR" is a reserved word that gets expanded to your userid in some way, so the admin can literally add just the first two lines, and every authenticated user now has his own personal repo namespace, starting with pub/<username>/

这里提到的前两行是:

repo pub/CREATOR/..*
    RW+     =   CREATOR

一旦完成,任何用户都可以:

关于gitolite:允许任何 repo RW+CD 的 RW 用户到他们的个人分支,不允许其他人,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8264564/

相关文章:

git - 删除精选的提交

git - 打开 .git/config : Permission denied

Git:无法推送新克隆的 repo

c - 如何用 git 处理这个补丁问题?

git 没有注意到图像的变化 - .jpg

git - ssh 克隆未在 git 中克隆存储库

linux - Gitolite 和非裸仓库?

gitolite - 重击 : gitolite: command not found

git - 罕见的 Git 服务器错误 : "Refused pubkey" (but the key is tested valid)

git - 如何授予用户访问 gitolite 中所有存储库的权限?