diff options
author | 2007-11-25 18:32:02 +0200 | |
---|---|---|
committer | 2007-11-25 18:32:02 +0200 | |
commit | 6ab2aa0a4bc0d67b7ba1cd3307706fe483c0b797 (patch) | |
tree | d432de97767a9fedc056192698dc3eaa8142b659 | |
parent | Add instructions for using git-daemon. (diff) | |
download | gitosis-gentoo-6ab2aa0a4bc0d67b7ba1cd3307706fe483c0b797.tar.gz gitosis-gentoo-6ab2aa0a4bc0d67b7ba1cd3307706fe483c0b797.tar.bz2 gitosis-gentoo-6ab2aa0a4bc0d67b7ba1cd3307706fe483c0b797.zip |
Add instructions for using gitweb.
-rw-r--r-- | README.rst | 33 | ||||
-rw-r--r-- | gitweb.conf | 20 | ||||
-rw-r--r-- | lighttpd-gitweb.conf | 21 |
3 files changed, 74 insertions, 0 deletions
@@ -157,6 +157,39 @@ For other operating systems, use a similar invocation in an ``init.d`` script, ``/etc/inittab``, ``inetd.conf``, ``runit``, or something like that (good luck). +Note that this short snippet is not a substitute for reading and +understanding the relevant documentation. + + +Using gitweb +============ + +``gitweb`` is a CGI script that lets one browse ``git`` repositories +on the web. It is most commonly used anonymously, but you could also +require authentication in your web server, before letting people use +it. ``gitosis`` can help here by generating a list of projects that +are publicly visible. Simply add a section ``[repo REPOSITORYNAME]`` +to your ``gitosis.conf``, and allow publishing with ``gitweb = yes`` +(or globally under ``[gitosis]``). You should also set ``description`` +and ``owner`` for each repository. + +Here's a LightTPD_ config file snippet showing how to run ``gitweb`` +as a CGI: + +.. _LightTPD: http://www.lighttpd.net/ + +.. include:: lighttpd-gitweb.conf + :literal: + +And a simple ``gitweb.conf`` file: + +.. include:: gitweb.conf + :literal: + +Note that this short snippet is not a substitute for reading and +understanding the relevant documentation. + + Contact ======= diff --git a/gitweb.conf b/gitweb.conf new file mode 100644 index 0000000..83cde79 --- /dev/null +++ b/gitweb.conf @@ -0,0 +1,20 @@ +# Include the global configuration, if found. +do "/etc/gitweb.conf" if -e "/etc/gitweb.conf"; + +# Point to projects.list file generated by gitosis. +# Here gitosis manages the user "git", who has a +# home directory of /srv/example.com/git +$projects_list = "/srv/example.com/git/repositories/gitosis-admin.git/projects.list"; + +# Where the actual repositories are located. +$projectroot = "/srv/example.com/git/repositories"; + +# By default, gitweb will happily let people browse any repository +# they guess the name of. This may or may not be what you wanted. I +# choose to allow gitweb to show only repositories that git-daemon +# is already sharing anonymously. +$export_ok = "git-daemon-export-ok"; + +# A list of base urls where all the repositories can be cloned from. +# Easier than having per-repository cloneurl files. +@git_base_url_list = ('git://example.com'); diff --git a/lighttpd-gitweb.conf b/lighttpd-gitweb.conf new file mode 100644 index 0000000..cd0bedd --- /dev/null +++ b/lighttpd-gitweb.conf @@ -0,0 +1,21 @@ +server.modules += ( + "mod_cgi", + "mod_setenv", +) + +url.redirect += ( + "^/gitweb$" => "http://example.com/gitweb/", +) +alias.url += ( + "/gitweb/" => "/usr/lib/cgi-bin/gitweb.cgi", + "/gitweb.css" => "/var/www/gitweb.css", + "/git-logo.png" => "/var/www/git-logo.png", + "/git-favicon.png" => "/var/www/git-favicon.png", +) + +$HTTP["url"] =~ "^/gitweb/" { + setenv.add-environment = ( + "GITWEB_CONFIG" => "/srv/example.com/gitweb/gitweb.conf", + ) + cgi.assign = ( "" => "" ) +} |