How do I have to configure gitweb and gitolite so they'll work together?

后端 未结 3 773
自闭症患者
自闭症患者 2020-12-29 10:42

I am trying to make gitweb work with gitolite... but unsuccessful so far.
I am working on a RedHat Linux machine. A user called git exists.

gitolite

3条回答
  •  被撕碎了的回忆
    2020-12-29 11:09

    You need to add the Gitolite contrib/gitweb.conf at the end of /etc/gitweb_config.perl.
    In other words, you need to call a Gitolite function from your gitweb.conf perl file, otherwise the integration GitWeb-Gitolite will never work.

    # check for (at least) "R" permission
        my ($perm, $creator) = &repo_rights($repo);
        return ($perm =~ /R/);
    

    (here repo_rights is a method from gitolite.pm)

    Check the section "helping with gitweb".

    The last lines you need to add at then end of gitweb_config.perl are:

    use lib (".");
    require "gitweb.conf.pl";
    

    That way, you will avoid any "500 - Internal Server Error syntax error at /etc/gitweb.conf" error message.

    If you don't have a gitweb_config.perl in which you declare gitweb.conf.pl, but directly "gitweb.conf.pl", then add "use lib (".");" as the first line of that file.

提交回复
热议问题