2009-08-26 02:47:27 +02:00
|
|
|
# example conf file for gitolite
|
2009-08-23 07:59:07 +02:00
|
|
|
|
2009-08-24 06:37:33 +02:00
|
|
|
# overall syntax:
|
|
|
|
# - everything in this is space-separated; no commas, semicolons, etc
|
|
|
|
# - comments in the normal shell-ish style; no surprises there
|
|
|
|
# - there are no continuation lines of any kind
|
2009-09-15 17:37:00 +02:00
|
|
|
# - user/repo names as simple as possible
|
2009-09-27 20:22:04 +02:00
|
|
|
# (usernames: only alphanumerics, ".", "_", "-";
|
|
|
|
# reponames: same, plus "/", but not at the start)
|
2009-08-23 10:14:46 +02:00
|
|
|
|
2009-08-23 07:59:07 +02:00
|
|
|
# objectives, over and above gitosis:
|
|
|
|
# - simpler syntax
|
2009-09-25 08:47:33 +02:00
|
|
|
# - easier gitweb/daemon control
|
|
|
|
# - specify who can push a branch/tag
|
|
|
|
# - specify who can rewind a branch/rewrite a tag
|
|
|
|
|
|
|
|
# convenience: allow specifying the access control in bits and pieces, even if
|
|
|
|
# they overlap. Keeps the config file smaller and saner. See the example in
|
|
|
|
# the "faq, tips, etc" document
|
2009-08-23 07:59:07 +02:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
2009-09-15 17:37:00 +02:00
|
|
|
# LISTS
|
2009-08-24 06:37:33 +02:00
|
|
|
|
|
|
|
# syntax:
|
2009-09-15 17:37:00 +02:00
|
|
|
# @listname = name [...]
|
|
|
|
# lists can be used as shorthand for usernames as well as reponames
|
2009-08-24 06:37:33 +02:00
|
|
|
|
2009-09-15 17:37:00 +02:00
|
|
|
# a list is equivalent to typing out all the right hand side names, so why do
|
|
|
|
# we need lists at all? (1) to be able to reuse the same set of usernames in
|
|
|
|
# the paras for different repos, (2) to keep the lines short, because lists
|
|
|
|
# accumulate, like squid ACLs, so you can say:
|
2009-10-14 07:40:06 +02:00
|
|
|
|
|
|
|
# @cust_A = cust1 cust2
|
|
|
|
# @cust_A = cust99
|
|
|
|
|
2009-09-15 17:37:00 +02:00
|
|
|
# and this is the same as listing all three on the same line
|
2009-08-24 06:37:33 +02:00
|
|
|
|
|
|
|
# you can nest groups, but not recursively of course!
|
2009-08-24 10:00:58 +02:00
|
|
|
|
2009-10-14 07:40:06 +02:00
|
|
|
# @interns = indy james
|
|
|
|
# @staff = bob @interns
|
2009-08-23 07:59:07 +02:00
|
|
|
|
2009-10-14 07:40:06 +02:00
|
|
|
# @staff = me alice
|
|
|
|
# @secret_staff = bruce whitfield martin
|
2009-09-15 17:37:00 +02:00
|
|
|
|
2009-10-14 07:40:06 +02:00
|
|
|
# @pubrepos = linux git
|
|
|
|
|
|
|
|
# @privrepos = supersecretrepo anothersecretrepo
|
2009-09-15 17:37:00 +02:00
|
|
|
|
2009-08-23 07:59:07 +02:00
|
|
|
# ----------------------------------------------------------------------------
|
2009-08-24 06:37:33 +02:00
|
|
|
# REPOS, REFS, and PERMISSIONS
|
|
|
|
|
|
|
|
# syntax:
|
2009-09-15 17:37:00 +02:00
|
|
|
# repo [one or more repos]
|
2009-09-16 16:22:03 +02:00
|
|
|
# (R|RW|RW+) [zero or more refexes] = [one or more users]
|
2009-08-24 06:37:33 +02:00
|
|
|
|
|
|
|
# notes:
|
2009-08-23 07:59:07 +02:00
|
|
|
|
2009-09-10 15:35:07 +02:00
|
|
|
# - the reponame is a simple name. Do not add the ".git" extension --
|
|
|
|
# that will be added by the program when the actual repo is created
|
|
|
|
|
2009-08-23 07:59:07 +02:00
|
|
|
# - RW+ means non-ff push is allowed
|
2009-08-24 06:37:33 +02:00
|
|
|
# - you can't write just "W" or "+"; it has to be R, or RW, or RW+
|
|
|
|
|
2009-09-16 16:22:03 +02:00
|
|
|
# - a refex is a regex that matches a ref :-) If you see the examples
|
|
|
|
# below you'll get it easy enough
|
|
|
|
|
|
|
|
# - refexes are specified in perl regex syntax
|
|
|
|
# - if no refex appears, the rule applies to all refs in that repo
|
|
|
|
# - a refex is automatically prefixed by "refs/heads/" if it doesn't start
|
|
|
|
# with "refs/" (so tags have to be explicitly named as
|
|
|
|
# refs/tags/pattern)
|
2009-08-23 07:59:07 +02:00
|
|
|
|
2009-09-15 17:37:00 +02:00
|
|
|
# - the list of users or repos can inlude any group name defined earlier
|
|
|
|
# - "@all" is a special, predefined, groupname that means "all users"
|
|
|
|
# (there is no corresponding shortcut for all repos)
|
2009-08-23 07:59:07 +02:00
|
|
|
|
2009-09-16 16:22:03 +02:00
|
|
|
# matching:
|
|
|
|
|
|
|
|
# - user, repo, and access (W or +) are known. For that combination, if
|
|
|
|
# any of the refexes match the refname being updated, the push succeeds.
|
|
|
|
# If none of them match, it fails
|
|
|
|
|
2009-08-24 06:37:33 +02:00
|
|
|
# anyone can play in the sandbox, including making non-fastforward commits
|
|
|
|
# (that's what the "+" means)
|
2009-10-14 07:40:06 +02:00
|
|
|
|
|
|
|
# repo sandbox
|
|
|
|
# RW+ = @all
|
2009-08-23 07:59:07 +02:00
|
|
|
|
|
|
|
# my repo and alice's repo have the same memberships and access, so we just
|
2009-08-24 06:37:33 +02:00
|
|
|
# put them both in the same stanza
|
2009-10-14 07:40:06 +02:00
|
|
|
|
|
|
|
# repo myrepo alicerepo
|
|
|
|
# RW+ = me alice
|
|
|
|
# R = bob eve
|
2009-08-23 07:59:07 +02:00
|
|
|
|
2009-08-24 06:37:33 +02:00
|
|
|
# this repo is visible to customers from company A but they can't write to it
|
2009-10-14 07:40:06 +02:00
|
|
|
|
|
|
|
# repo cust_A_repo
|
|
|
|
# R = @cust_A
|
|
|
|
# RW = @staff
|
2009-08-23 07:59:07 +02:00
|
|
|
|
|
|
|
# idea for the tags syntax shamelessly copied from git.git
|
|
|
|
# Documentation/howto/update-hook-example.txt :)
|
2009-10-14 07:40:06 +02:00
|
|
|
|
|
|
|
# repo @privrepos thirdsecretrepo
|
|
|
|
# RW+ pu = bruce
|
|
|
|
# RW master next = bruce
|
|
|
|
# RW refs/tags/v[0-9].* = bruce
|
|
|
|
# RW refs/tags/ss/ = @secret_staff
|
|
|
|
# RW tmp/.* = @secret_staff
|
|
|
|
# R = @secret_staff
|
2009-09-25 08:47:33 +02:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# GITWEB AND DAEMON CONTROL
|
|
|
|
|
|
|
|
# there is no special syntax for this. If a repo gives read permissions to
|
|
|
|
# the special user "gitweb" or "daemon", the corresponding changes are made
|
|
|
|
# when you compile; see "faq, tips, etc" document for details.
|
|
|
|
|
|
|
|
# this means you cannot have a real user called "gitweb" or "daemon" but I
|
|
|
|
# don't think that is a problem :-)
|
|
|
|
|