Book Image

Gitolite Essentials

By : Sitaram Chamarty
Book Image

Gitolite Essentials

By: Sitaram Chamarty

Overview of this book

Table of Contents (19 chapters)
Gitolite Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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, you can do this:

@junior-devs    =  bob carol dave

-          master    =  @junior-devs
RW+                  =  @junior-devs

As you can see, this is far more convenient, and also less error...