Gitolite

Installation

DEBIAN_PRIORITY=low apt-get install gitolite3
  • System username for gitolite: git
  • Repository path: /home/git/
  • Administrator's SSH key: ssh-rsa …

lost admin key/access

Log on to the server, and run

gitolite setup -pk alice.pub

.

That's it; the new alice.pub file replaces whatever existed in the repo before.

Usage

Clone control repo:

git clone git@localhost:gitolite-admin

Adding users and repos

  • add user keys username.pub into keydir
  • edit conf/gitolite.conf
gitolite.conf
repo foo
        RW+         =   alice
        RW          =   bob
        R           =   carol

* commit changes

 git add conf
 git add keydir
 git commit -m "added foo, gave access to alice, bob, carol"
 git push

Push existing repos

git remote add origin git@localhost:mynewrepo
git push origin master --set-upstream