5.Install gitosis
cd /tmp
git clone git://eagain.net/gitosis.git
cd gitosis
sudo python setup.py install
note: if you get time out error, that’s because git will not use system proxy, you need setup the proxy for git:
·Install corkscrew:
sudo apt-get install corkscrew
·Update /home/{username}/.gitconfig
Add
[core]
gitProxy = /usr/bin/myproxy/git-proxy
·Create file git-proxy under /usr/bin/myproxy/
With concent:
10.Config gitweb
Link static files:
cd /var/www/
sudo ln -s /usr/share/gitweb/*
edit gitweb.conf, remove the ‘#’ for red lines and update the data as below:
# path to git projects (<project>.git)
#$projectroot = "/var/cache/git";
$projectroot = "/home/git/repositories";
# directory to use for temp files
$git_temp = "/tmp";
# target of the home link on top of all pages
$home_link = $my_uri || "/";
# html text to include at home page
$home_text = "indextext.html";
# file with project list; by default, simply scan the projectroot dir.
$projects_list = $projectroot;
# stylesheet to use
@stylesheets = ("/gitweb/static/gitweb.css");
# javascript code for gitweb
$javascript = "gitweb/static/gitweb.js";
# logo to use
$logo = "/gitweb/static/git-logo.png";
# the 'favicon'
$favicon = "/gitweb/static/git-favicon.png";
# git-diff-tree(1) options to use for generated patches
#@diff_opts = ("-M");
@diff_opts = ();