forked from res0nat0r/gitosis
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·34 lines (29 loc) · 1 KB
/
install.sh
File metadata and controls
executable file
·34 lines (29 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Assuming the following have been executed:
#sudo apt-get install python-setuptools
#sudo easy_install pip
#sudo apt-get install git
#sudo apt-get install libzmq-dev
#sudo apt-get build-dep python-zmq
#sudo pip install pyzmq
#cd /home/git
#sudo git clone git://github.com/jvillama/gitosis.git
#cd gitosis
if [ $# -eq 1 ]
then
sudo python setup.py install
sudo adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
#sudo mkdir /home/git/.ssh
#sudo chown -R git:git /home/git/.ssh
#sudo ssh-keygen -t rsa #create file in /home/git/.ssh/id_rsa
sudo cp $1 /tmp/tmp.pub
sudo chown git:git /tmp/tmp.pub
sudo -H -u git gitosis-init < /tmp/tmp.pub #/home/git/.ssh/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
sudo mkdir /etc/gitosis
sudo cp config /etc/gitosis/config
else
echo Please provide one pub key argument
fi
# To test:
#sudo nosetests gitosis/test/test_dcontrol.py