This post is not a blog write up and just consists of steps I went through to setup a git server on my home server ( Raspberry Pi, for now).
File content is available below.
/etc/gitweb.conf
gitweb.cgi
projects
directory and
--enable=receive-pack
as the additional parameter.Files.
etc/gitweb.conf
our $projectroot = "/home/pi/git-repos";
our @git_base_url_list = qw(git://192.168.31.162 pi@192.168.31.162:git-repos);
add this to the server listener in nginx
location /gitweb.cgi {
include fastcgi_params;
gzip off;
fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/gitweb.cgi;
fastcgi_param GITWEB_CONFIG /etc/gitweb.conf;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location / {
root /usr/share/gitweb;
index gitweb.cgi;
}
Commands to create a repository.
git init --bare --shared <project-name>
cd <project-name>
touch git-daemon-export-ok
cp hooks/ppost-update.sample hooks/post-update
chomod a+x hooks/post-update
echo "Project Description" > description
Adios!