Defining user and repo groups

Gitolite allows you to define groups of users or repositories for convenience. The syntax is very simple, and does not distinguish between a user group and a repository group. For example, take a look at the deny rule example in the previous section:

-         master    =  bob
RW+                 =  bob

Let's say that, instead of just Bob, you had several more users who must be prevented from pushing the master branch, perhaps because they are all junior developers. One way is to add each of their usernames on both the rule lines, after Bob's username, like this:

-          master    =  bob carol dave
RW+                  =  bob carol dave

But this gets cumbersome, and will only get worse if there are more rules to be applied to the same group of people.

With groups, however, ...

Get Gitolite Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.