2011-10-26 21:57:51 +01:00
|
|
|
===================== Setup gitolite
|
|
|
|
|
|
|
|
--------------- As root (sudo su -) on server
|
|
|
|
|
|
|
|
* urpmi.addmedia --distrib --mirrorlist '$MIRRORLIST'
|
|
|
|
* urpmi git
|
|
|
|
* useradd git
|
|
|
|
* passwd git
|
2011-10-28 17:01:41 +01:00
|
|
|
* mkdir /share/git_projects
|
|
|
|
* sudo chown git:git /share/git_projects
|
2011-10-26 21:57:51 +01:00
|
|
|
|
|
|
|
--------------- As user who will manage gitolite
|
|
|
|
|
|
|
|
* scp -o preferredauthentications=password ~/.ssh/id_rsa.pub git@gitolite:/tmp/ga_admin.pub
|
|
|
|
|
|
|
|
--------------- As git user (su - git) on server
|
|
|
|
|
|
|
|
* git clone git://github.com/sitaramc/gitolite
|
|
|
|
* cd gitolite
|
|
|
|
* src/gl-system-install
|
2011-10-28 18:15:35 +01:00
|
|
|
* gl-setup ~/ga_admin.pub # /tmp/ga_admin.pub
|
2011-10-26 21:57:51 +01:00
|
|
|
|
2011-10-28 17:01:41 +01:00
|
|
|
--------------- Settings for .gitolite.rc during install
|
2011-10-26 21:57:51 +01:00
|
|
|
|
2011-10-28 17:01:41 +01:00
|
|
|
* $REPO_UMASK = 0022;
|
|
|
|
* $REPO_BASE = "/home/share/git_projects";
|
|
|
|
* $GIT_PATH = "/opt/local/bin"; # if you have several git versions
|
2011-10-28 14:27:12 +01:00
|
|
|
|
2011-10-28 17:01:41 +01:00
|
|
|
--------------- As user who will manage gitolite
|
2011-10-28 14:27:12 +01:00
|
|
|
|
2011-10-28 17:01:41 +01:00
|
|
|
* cd /share # /var/rosa
|
|
|
|
* git clone git@localhost:gitolite-admin
|
2011-10-28 14:27:12 +01:00
|
|
|
|
|
|
|
--------------- Setup hooks
|
|
|
|
|
|
|
|
* cd /home/git/.gitolite/hooks/common
|
|
|
|
* mv update.secondary.sample update.secondary
|
|
|
|
* mkdir update.secondary.d
|
|
|
|
* touch update.secondary.d/update.auto-build
|
|
|
|
* chmod +x update.secondary update.secondary.d/update.auto-build
|
2011-10-28 17:01:41 +01:00
|
|
|
|
|
|
|
--------------- Code for update.auto-build
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
if [ "$GL_REPO" != "gitolite-admin" ]; then
|
|
|
|
curl "http://localhost:3000/projects/auto_build?git_repo=$GL_REPO&git_user=$GL_USER"
|
|
|
|
fi
|