Created
July 27, 2010 17:29
-
-
Save cdwilson/492555 to your computer and use it in GitHub Desktop.
Gitosis setup instructions for Fedora
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
# Gitosis setup instructions for Fedora | |
# copied from http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way | |
# and modified to work on Fedora | |
# Comment out the next two lines after you've changed this script to match your config | |
echo "This is not meant to be run as a script!" | |
exit 0 | |
# do you have setuptools or distribute? if not, run these commands | |
cd ~/src | |
curl -O http://python-distribute.org/distribute_setup.py | |
sudo python distribute_setup.py | |
# clone gitosis | |
cd ~/src | |
git clone git://eagain.net/gitosis.git | |
# install gitosis | |
cd gitosis | |
sudo python setup.py install | |
# create the git group/user | |
sudo groupadd -r git | |
sudo useradd -d /home/git -c "git version control" -s /bin/sh -g git git | |
# copy your ssh key to the server | |
scp ~/.ssh/id_rsa.pub [email protected]:/tmp/id_rsa.pub | |
# ssh to your server | |
ssh root@$your.git.server | |
# gitosis init | |
sudo -H -u git gitosis-init < /tmp/id_rsa.pub | |
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update | |
# end the ssh session | |
exit | |
# clone the gitosis-admin.git repo on your local machine | |
cd ~/src | |
git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment