Information Technology Reference
In-Depth Information
All management tasks concerning users are performed by someone who can be authen-
ticated with the
admin.pub
key. In this recipe it is
vagrant
user. The
admin.pub
key is the parameter passed to the
$ gl-setup
command.
Gitolite doesn't have a user interface. The management is done through a
gitolite-admin
repository available under the following URL:
git@localhost:gitolite-admin
.
The first step is to clone this repository:
$ git clone
git@localhost:gitolite-admin
The above command will succeed only if it is issued by the user whose one of the
RSA keys is the same as
admin.pub
. Thus the
vagrant
user can clone the reposit-
ory
gitolite-admin
. When Peter tries to clone it he will only see the message
about insufficient rights.
Once the
gitolite-admin
repository is cloned by
vagrant
, he can perform
the administrative tasks. To add users he copies public keys into
gitolite-admin/
keydir
directory. To assign rights he edits the
gitolite-admin/conf/git-
olite.conf
file. The changes are applied when the administrator pushes them to the
server:
# the command issued by administrator
# in his or her gitolite-admin repository
# applies the rights
$ git push origin master
The simplest syntax to assign privileges in
gitolite.config
file is the follow-
ing:
repo foo
RW+
=
sarah
RW
=
paul
R
=
ann
It assigns
RW+
rules to
sarah
,
RW
rule to
paul
, and
R
rule to
ann
. All these rules
are defined for
foo
repository. The keys for
sarah
,
paul
, and
ann
should be stored
in: