Where Does Gitolite Store Config and Repos?
Gitolite keeps site config in ~/.gitolite.rc with repos in ~/repositories. Daily admin runs through the gitolite-admin repo.
Last updated
Gitolite centers on the hosting user's home: ~/.gitolite.rc for site policy (umask, git-config key allowlists, command permissions), ~/repositories for every hosted repo including gitolite-admin itself, and ~/.ssh/authorized_keys generated from keydir. Daily admin never touches the server: clone gitolite-admin, edit conf plus keydir, push, hooks apply.
The rc file stays deliberately out of the admin repo (admins who can push must not gain shell), symlink it in only if you accept that trade. Moving servers means fresh install with the same admin key, then restore repos plus rc; moving without the rc loses policy while keeping code. Wildcard repos and gl-creator files complicate restores, so verify access rules after moving.
Where Gitolite stores this, by platform
~/.gitolite.rc (hosting user)
Site policy (umask, key allowlists, command perms). Deliberately outside the admin repo. Moving servers: reinstall with same admin key, restore rc plus repos plus keys file.
Frequently asked questions
how do i back up gitolite
Copy ~/.gitolite.rc, ~/repositories (all hosted repos including gitolite-admin), and ~/.ssh/authorized_keys with gitolite stopped. Repos carry code; rc carries site policy; keys file carries access. Restore all three to the same home.
how do i add users and repos to gitolite
Clone gitolite-admin, add pubkeys under keydir/, edit conf/gitolite.conf, commit, push. The hook applies changes server-side. Never hand-edit ~/repositories or authorized_keys; the next push overwrites both.
Notice an outdated path? Let us know.