GitSetup
From PDP/Grid Wiki
Revision as of 10:02, 10 February 2010 by Dennisvd@nikhef.nl (talk | contribs)
Git setup on span
I push siteinfo and firstboot work to git repositories on my home dir on span.nikhef.nl. I installed gitweb to have an easy web frontend for these repositories.
I followed the instructions from Gitweb wiki.
The git installation on span is from DAG:
git-1.5.2.1-1.el5.rf
The web application gitweb.cgi is not included in the rpm, so it was built from the sources in the source rpm.
wget http://dag.wieers.com/rpm/packages/git/git-1.5.2.1-1.rf.src.rpm rpm -i git-1.5.2.1-1.rf.src.rpm cd rpmbuild/SOURCES/ tar xfj git-1.5.2.1.tar.bz2 cd git-1.5.2.1 make GITWEB_PROJECTROOT=/srv/git prefix=/usr gitweb/gitweb.cgi
gitweb is installed in
/srv/git
Apache configuration in /etc/httpd/conf.d/git.conf:
Alias /git /srv/git
<Directory /srv/git > Options Indexes FollowSymLinks ExecCGI AddHandler cgi-script cgi AllowOverride None DirectoryIndex gitweb.cgi RewriteEngine On RewriteBase /git RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.* /gitweb.cgi/$0 [L,PT] </Directory>
The /srv/git directory contains symlinks to the repositories.
$ ll /srv/git total 352 lrwxrwxrwx 1 root root 28 Feb 9 23:51 firstboot -> /home/dennisvd/src/firstboot -rw-r--r-- 1 root root 164 Feb 9 23:42 git-favicon.png -rw-r--r-- 1 root root 208 Feb 9 23:42 git-logo.png -rwxr-xr-x 1 root root 153112 Feb 9 23:42 gitweb.cgi -rw-r--r-- 1 root root 6946 Feb 9 23:42 gitweb.css -rw-r--r-- 1 root root 24142 Feb 9 22:30 gitweb.js -rwxr-xr-x 1 root root 153311 Feb 9 23:42 gitweb.perl lrwxrwxrwx 1 root root 31 Feb 10 00:13 siteinfo.git -> /home/dennisvd/src/siteinfo.git
You can browse the repositories at http://span.nikhef.nl/git/.