- GitHub.com provides great public repository hosting.
- vanilla git over ssh works for simple project structures.
- gitosis works well where you'd like to use ssh pubkeys without shell access.
- gitolite works well where you'd like gitosis to have finer access control.
See install option #2: "root method" at http://github.com/sitaramc/gitolite/blob/pu/doc/1-INSTALL.mkd
As root:
cd /usr/local/src
git clone git://github.com/sitaramc/gitolite gitolite
cd gitolite
mkdir -p /usr/local/share/gitolite/conf /usr/local/share/gitolite/hooks
./install-update.sh # put into a script, so it can be run later to update
See install-update.sh, which simple does a git pull
(for updating later) then:
./src/gl-system-install /usr/local/bin /usr/local/share/gitolite/conf /usr/local/share/gitolite/hooks
Copy your admin pubkey, and note that the name matters (so choose "you" wisely):
cp path/to/you.pub /tmp/you.pub
Create the git user, as root (change /home/git for your site):
adduser --system --shell /bin/sh --home /home/git --gecos 'Git Version Control System' --disabled-password --group git
Switch to git user:
su - git
gl-setup /tmp/you.pub
This will fire up git's $EDITOR. Note $REPO_BASE, $REPO_UMASK, and $PERSONAL. All others have good defaults imo. See .gitolite.rc.
From your client machine, as you:
git clone git@server:gitolite-admin
Then see http://github.com/sitaramc/gitolite/blob/pu/doc/2-admin.mkd
This entire gist is essentially reduced to:
This will setup gitolite and ask for "git" system user name, repository directory, and admin SSH pubkey. See: http://serverfault.com/questions/225495/ubuntu-server-gitosis-user-naming-convention
The default gitolite.conf is quite usable. A slightly expanded version is: