summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@leap.se>2013-08-24 01:05:40 +0200
committerkwadronaut <kwadronaut@leap.se>2013-08-24 01:05:40 +0200
commit08da308d1b4d50c09f88262a277b3b41f793fb09 (patch)
tree3c2147cfd80200b32b179485067e5c0da1bbbf4a
parent017ec34f52e308e791b4c66a472513e9415c0521 (diff)
gitweb for gitolite v2
-rw-r--r--templates/gitweb.conf.erb45
1 files changed, 6 insertions, 39 deletions
diff --git a/templates/gitweb.conf.erb b/templates/gitweb.conf.erb
index 7774ed2..0100e3d 100644
--- a/templates/gitweb.conf.erb
+++ b/templates/gitweb.conf.erb
@@ -14,53 +14,20 @@ $home_text = "indextext.html";
$projects_list = $projectroot;
# stylesheet to use
-$stylesheet = "/gitweb.css";
+#$stylesheet = ("static/gitweb.css");
# logo to use
-$logo = "/git-logo.png";
+#$logo = "static/git-logo.png";
# the 'favicon'
-$favicon = "/git-favicon.png";
+#$favicon = "static/git-favicon.png";
# --------------------------------------------
-# Per-repo authorization based on gitolite ACL
-# Include this in gitweb.conf
-# See doc/3-faq-tips-etc.mkd for more info
-
-# HOME of the gitolite user
-my $gl_home = $ENV{HOME} = "/home/git";
-
-# the following variables are needed by gitolite; please edit before using
-
-# this should normally not be anything else
-$ENV{GL_RC} = "$gl_home/.gitolite.rc";
-# this can have different values depending on how you installed.
-
-$ENV{GL_BINDIR} = "/usr/share/gitolite";
-# If in doubt take a look at ~/.ssh/authorized_keys; at least one of the lines
-# might contain something like:
-# command="/home/git/.gitolite/src/gl-auth-command
-# and you should use whatever directory the gl-auth-command is in (in this
-# example /home/git/.gitolite.src)
+# We're on gitolite v2, be careful!
# finally the user name
$ENV{GL_USER} = $cgi->remote_user || "gitweb";
-# now get gitolite stuff in...
-unshift @INC, $ENV{GL_BINDIR};
-#require gitolite_rc; gitolite_rc -> import;
-require gitolite; gitolite -> import;
-
-# set project root etc. absolute paths
-$ENV{GL_REPO_BASE_ABS} = $projectroot;
-
-$export_auth_hook = sub {
- my $repo = shift;
- # 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<%= project_root %>\E\/?(.+)\.git$!$1!;
+our $export_ok = "git-daemon-export-ok";
+$strict_export = true;
- # check for (at least) "R" permission
- my ($perm, $creator) = &repo_rights($repo);
- return ($perm =~ /R/);
-};