Last active
December 15, 2015 21:39
-
-
Save drewinglis/5327347 to your computer and use it in GitHub Desktop.
Gitolite Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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