Skip to content

Instantly share code, notes, and snippets.

@drewinglis
Last active December 15, 2015 21:39
Show Gist options
  • Save drewinglis/5327347 to your computer and use it in GitHub Desktop.
Save drewinglis/5327347 to your computer and use it in GitHub Desktop.
Gitolite Setup
#!/bin/sh
# only tested on ubuntu
# add a 'git' user to store things under
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
# i am become git
sudo su git
cd
# grab gitolite source
git clone git://github.com/sitaramc/gitolite
mkdir -p $HOME/bin
# make sure you put your public key at /home/git/<yourname>.pub and export the $yourname variable,
# or edit the last line so that it has the correct path
# add $HOME/bin to git's path and install
echo "PATH=$HOME/bin:$PATH" > ~/.bashrc
gitolite/install -to $HOME/bin
gitolite setup -pk ${yourname}.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment