forked from gitlabhq/gitlabhq
-
Notifications
You must be signed in to change notification settings - Fork 0
Reinstall gitolite
randx edited this page Dec 2, 2012
·
5 revisions
sudo mv /home/git/repositories /home/gitlab/bk/
sudo userdel -r git
sudo adduser \
--system \
--shell /bin/sh \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
sudo usermod -a -G git gitlab
sudo usermod -a -G gitlab git
sudo -H -u git git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite
cd /home/git
sudo -u git -H mkdir bin
sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
sudo -u git sh -c 'gitolite/install -ln /home/git/bin'
sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
sudo chmod 0444 /home/git/gitlab.pub
sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; gitolite setup -pk /home/git/gitlab.pub"
sudo mv /home/gitlab/bk /home/git/repositories
sudo chmod -R g+rwX /home/git/repositories/
sudo chown -R git:git /home/git/repositories/
sudo -u gitlab -H git clone git@localhost:gitolite-admin.git /tmp/gitolite-admin
cd /home/gitlab/gitlab/
sudo cp ./lib/hooks/post-receive /home/git/.gitolite/hooks/common/post-receive
sudo chown git:git /home/git/.gitolite/hooks/common/post-receive
sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_keys RAILS_ENV=production
sudo -u gitlab -H bundle exec rake gitlab:gitolite:update_repos RAILS_ENV=production
sudo -u gitlab -H bundle exec rake gitlab:app:enable_automerge RAILS_ENV=production