Robbat2 (robbat2) wrote,

Gitosis+GitWeb on Gentoo

Following up on the previous post about Gitosis on Gentoo, here's how to integrate GitWeb into the config. You should emerge dev-util/git with USE="cgi perl", and then dump the following two bits of config in. The following is /etc/git/
$feature{'blame'}{'default'} = [1];
$feature{'blame'}{'override'} = 1;
$feature{'pickaxe'}{'default'} = [1];
$feature{'pickaxe'}{'override'} = 1;
$feature{'search'}{'default'} = [1];
$feature{'search'}{'override'} = 1;
$feature{'grep'}{'default'} = [1];
$feature{'grep'}{'override'} = 1;
$feature{'snapshot'}{'default'} = ['tgz', 'tbz2', 'zip'];
$feature{'snapshot'}{'override'} = 1;

$projectroot = '/var/gitroot/';
$site_name = "Gentoo Linux Overlays-Git";
$fallback_encoding = 'utf-8';

# These lock it down
$projects_list = '/var/spool/gitosis/gitosis/projects.list';
# Don't enable these
#$export_ok = 1;
#$strict_export = 1;

# This lets it make the URLs you see in the header
@git_base_url_list = ( 'git://', 'git+ssh://' );

# Title
$home_link_str = 'overlays';
So that GitWeb can find this, we have the following chunk in an apache vhost.
Alias /gitweb/ /usr/share/git/gitweb/
<Directory "/usr/share/git/gitweb/">
    AllowOverride AuthConfig
    Options +ExecCGI +Indexes
    Order allow,deny
    Allow from all
    DirectoryIndex gitweb.cgi
    SetEnv GITWEB_CONFIG "/etc/git/"
    AddHandler cgi-script .cgi
Tags: git, gitosis, gitweb

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded