Strictly speaking, gitolite doesn't know where users come from. If that surprises you, read [this][auth]. However, gitolite does help with ssh-based authentication, so here's some info on adding and removing users.
WARNING: Do NOT add new repos or users manually on the server. Gitolite users, repos, and access rules are maintained by making changes to a special repo called 'gitolite-admin' and pushing those changes to the server.
All operations are in a clone of the gitolite-admin repo.
To add a user, say Alice, obtain her public key (typically
$HOME/.ssh/id_rsa.pub on her workstation), copy it to
keydir with the user
name as the basename (e.g., 'alice.pub' for user alice), then
keydir/alice.pub. (All keys files must have names ending in ".pub", and must
be in openssh's default format).
To remove a user,
git rm keydir/alice.pub.
In both cases, you must commit and push. On receiving the push, gitolite will carry out the changes specified.
The user name is simply the base name of the public key file name. So 'alice.pub', 'foo/alice.pub' and 'bar/alice.pub', all resolve to user "alice".
The simplest and most understandable is to put their keys in different subdirectories, (alice.pub, home/alice.pub, laptop/alice.pub, etc).
There is another way that involves creating key files like
firstname.lastname@example.org, but there is a complication because gitolite also
allows full email addresses as user names. (I.e.,
denotes the user called
This older method of enabling multi-keys was developed to deal with that. It will continue to work and be supported in code, simply because I prefer it. But I will not accept questions or doc patches for it, because it seems it is too difficult to understand for a lot of people. This table of sample pubkey filenames and the corresponding derived usernames is all you get:
plain username, no multikey
plain username, with multikeys
email@example.com sitaramc firstname.lastname@example.org sitaramc
email address as username, no multikey
email address as username, with multikeys
email@example.com@laptop.pub firstname.lastname@example.org email@example.com@desktop.pub firstname.lastname@example.org