用这样的gitoliteconfiguration:
repo users/CREATOR/.+ C = @defaultgroup RW+D = CREATOR RWD = @defaultgroup
我们的服务器的用户可以很容易地创build自己的仓库,只需克隆“待创build”回购 – 例如:
git clone [email protected]/users/foo.bar/new
这也出现在我们的gitweb。 但是缺less的是一些gitconfiguration。 我一直无法弄清楚如何将工作configuration添加到这些新创build的存储库(例如gitweb.url)?
只是为了比较 – 这是一个“正常”回购如何看起来像:
repo normal/repo R = @all RW = @defaultgroup config gitweb.url = [email protected]/normal/repo.git config receive.denyNonFastforwards = true
任何提示欢迎,干杯。
从gitoliteconfiguration页面 :
您也可以在string中使用特殊值
%GL_REPO
和%GL_CREATOR
。
前者适用于所有回购,而后者只适用于回购 。
所以这可以工作(没有testing):
config gitweb.url = [email protected]/%GL_CREATOR/%GL_REPO config receive.denyNonFastforwards = true
(我想最后一行适用于在repo users/CREATOR/.+
下创build的所有wild回购)