Created
July 30, 2012 20:40
-
-
Save grapeot/3209996 to your computer and use it in GitHub Desktop.
Gitolite Setup @ EC2
This file contains hidden or 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
# Install git | |
cd $HOME | |
sudo yum -y update | |
sudo yum -y install git | |
# Prepare the public key, which will be used later | |
cp ~/.ssh/authorized_keys /tmp/Default.pub | |
chmod a+r /tmp/Default.pub | |
# Use the user git to install gitolite from source. | |
# More details are available in install script of gitolite | |
sudo adduser git | |
sudo su git | |
cd ~ | |
git clone git://github.com/sitaramc/gitolite gitolite-source | |
mkdir bin | |
export PATH=/home/git/bin:$PATH | |
./gitolite-source/install -ln | |
gitolite setup -pk /tmp/Default.pub | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After installing gitolite, you can edit the ssh config (~/.ssh/config, create one if that doesn't exist) to make it easy to access git repo conveniently next time.
Sample lines would be like:
Host localgit User git HostName ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com IdentityFile ~/.ssh/git
And then git clone the admin repo with
Gitolite is pretty intuitive to use. Consult https://sites.google.com/site/senawario/home/gitolite-tutorial from "Step 7" for more details.