Você precisa adicionar um arquivo gitweb.conf.pl (como este) que:
- será chamado pelo gitweb (se esse arquivo existir e definir um
export_auth_hooksub,gitweb.cgichama) - especificará onde os repositórios do git são
- chamará gitolite
Isso inclui:
$ENV{GL_REPO_BASE_ABS} = "$ENV{HOME}/repositories";
$export_auth_hook = sub {
my $repo = shift;
my $user = $ENV{GL_USER};
# gitweb passes us the full repo path; so we strip the beginning
# and the end, to get the repo name as it is specified in gitolite conf
return unless $repo =~ s/^\Q$projectroot\E\/?(.+)\.git$/$1/;
# check for (at least) "R" permission
my $ret = &access( $repo, $user, 'R', 'any' );
my $res = $ret !~ /DENIED/;
return ($ret !~ /DENIED/);
};
Com access() sendo uma função de gitolite/src/lib/Gitolite/Conf/Load.pm .
Seu httpd.conf chamaria então o script gitweb.cgi como neste um .