Gitolite: allow RW users of any RW + CD repo to their personal branch, prohibit other users

In gitolite, I would like to provide all the writable users any repo on RW + CD to my personal branch. In other words: everyone who is allowed RW is allowed to create projects, but only in their personal namespace.

I understand that I can basically do it like this:

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

but that means that I would have to essentially duplicate the list of users for each repo. Although this is normal for a small number of repositories, it definitely gets ugly when the number of repositories or users grows.

I thought of something like this:

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

But this, apparently, gives at least read access to all users in all projects, even if they would not have read rights otherwise.

What is the best solution for this?

+4
source share
1 answer

One solution would be to manage these branches within a single repo per user using a group repo or "wildrepo" :

As described in detail in the user gitolite doc section:

Please note that " CREATOR " is a reserved word that extends to your userid some way, so the administrator can literally add only the first two lines, and each authenticated user now has its own repo namespace, starting with pub/<username>/

The first two lines mentioned here:

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

Once this is done, any user can:

+2
source

Source: https://habr.com/ru/post/1382992/


All Articles