2009-08-27 11:54:23 +02:00
|
|
|
# administering and running gitolite
|
|
|
|
|
2009-08-30 08:38:54 +02:00
|
|
|
*Note*: some of the paths in this document use variable names. Just refer to
|
|
|
|
`~/.gitolite.rc` for the correct values for *your* installation.
|
2009-08-29 07:21:48 +02:00
|
|
|
|
2009-08-27 11:54:23 +02:00
|
|
|
### administer
|
|
|
|
|
2009-09-16 06:46:11 +02:00
|
|
|
First of all, ***do NOT add new repos manually***, unless you know how to add
|
|
|
|
the required hook as well. Without the hook, branch-level access control will
|
|
|
|
not work for that repo, which sorta defeats the idea of using gitolite :-)
|
|
|
|
|
|
|
|
Please read on to see how to do this correctly.
|
|
|
|
|
|
|
|
#### adding users and repos
|
|
|
|
|
2009-08-27 11:54:23 +02:00
|
|
|
* ask each user who will get access to send you a public key. See other
|
|
|
|
sources (for example
|
2009-08-29 07:21:48 +02:00
|
|
|
[here](http://sitaramc.github.com/0-installing/2-access-gitolite.html#generating_a_public_key))
|
2009-08-27 11:54:23 +02:00
|
|
|
for how to do this
|
2009-08-30 17:49:36 +02:00
|
|
|
|
2009-08-29 07:21:48 +02:00
|
|
|
* rename each public key according to the user's name, with a `.pub`
|
|
|
|
extension, like `sitaram.pub` or `john-smith.pub`. You can also use
|
|
|
|
periods and underscores
|
2009-08-30 17:49:36 +02:00
|
|
|
|
2009-10-11 05:01:59 +02:00
|
|
|
* copy all these `*.pub` files to `keydir` in your gitolite-admin repo clone
|
2009-08-30 17:49:36 +02:00
|
|
|
|
2009-10-11 05:01:59 +02:00
|
|
|
* edit the config file (`conf/gitolite.conf` in your admin repo clone). See
|
|
|
|
`conf/example.conf` in the gitolite source for details on what goes in
|
|
|
|
that file, syntax, etc. Just add new repos as needed, and add new users
|
|
|
|
and give them permissions as required. The users names should be exactly
|
|
|
|
the same as their keyfile names, but without the `.pub` extension
|
2009-09-16 06:46:11 +02:00
|
|
|
|
2009-10-11 05:01:59 +02:00
|
|
|
* when done, commit your changes and push
|
2009-09-16 06:46:11 +02:00
|
|
|
|
2009-09-25 08:47:33 +02:00
|
|
|
#### specifying gitweb and daemon access
|
|
|
|
|
|
|
|
This is a feature that I personally do not use (corporate environments don't
|
|
|
|
like unauthenticated access of any kind to any repo!), but someone wanted it,
|
|
|
|
so here goes.
|
|
|
|
|
|
|
|
There's **no special syntax** for this -- just give read permission to a user
|
|
|
|
called `gitweb` or `daemon`! (This also means you can't have a normal user
|
|
|
|
with either of those two names, but I doubt that's a problem!). See the "faq,
|
|
|
|
tips, etc" document for easy ways to specify access for multiple repositories.
|
|
|
|
|
|
|
|
Note that this does **not** install or configure gitweb/daemon -- that is a
|
|
|
|
one-time setup you must do separately. All this does is:
|
|
|
|
|
|
|
|
* for gitweb, add the repo to the list of projects to be served by gitweb
|
|
|
|
(see the config file variable `$PROJECTS_LIST`, which should have the same
|
|
|
|
value you specified for `$projects_list` when setting up gitweb)
|
|
|
|
* for daemon, create the file `git-daemon-export-ok` in the repository
|
|
|
|
|
2009-10-11 05:01:59 +02:00
|
|
|
The "compile" script will keep these files consistent with the config settings
|
|
|
|
-- this includes removing such settings if you remove "read" permissions for
|
|
|
|
the special usernames.
|