debian/control: Standards-Version: 4.3.0.1
[git/debian.git] / debian / git.README.Debian
blob7fdf56572bd26f1a5d552976a650c33c528d8076
1 Git for Debian
2 --------------
4 When setting up a git.example.org server, there are several things to
5 configure to make everything work nicely together.  All this is optional.
7 1. Run a git-daemon.  This allows people to use a git:// URL to access your
8 repositories.  This package provides the git-daemon program, to enable a
9 git-daemon service, configure inetd(8) to launch it on demand, or install the
10 git-daemon-run package to run it permanently:
11  cat >> /etc/inetd.conf <<EOF
12 git stream tcp4 nowait nobody /usr/bin/git git daemon --inetd --base-path=/var/lib /var/lib/git
13 git stream tcp6 nowait nobody /usr/bin/git git daemon --inetd --base-path=/var/lib /var/lib/git
14 EOF
16 Or:
17  apt-get install git-daemon-run
19 Wait five seconds for the service to be picked up, and check its status and
20 logs:
22  sv stat git-daemon
23  cat /var/log/git-daemon/current
25 The git daemon by default looks into the directory /var/lib/git/ for
26 repositories (this is configured in /etc/sv/git-daemon/run).  It expects
27 the repositories' .git subdirectories in /var/lib/git/, symlinks pointing
28 to the corresponding subdirectories in the repositories are just fine, e.g.:
30  ln -s ~pape/git/foo/.git /var/lib/git/foo.git
32 Now git-clone git://git.example.org/git/repo will work.
34 2. Configure a web server for git.  This allows people to use a http:// URL
35 to access your repositories.
37 Here's an example for an apache virtual server.  Add a stanza to your apache
38 configuration that looks like this:
40 <VirtualHost *:80>
41     ServerName git.example.org
42     ServerAdmin webmaster@example.org
43     HeaderName HEADER
44     # bogus but safe DocumentRoot
45     DocumentRoot /var/lib/git
46     ErrorLog /var/log/apache2/git.example.org-error.log
47     CustomLog /var/log/apache2/git.example.org-access.log combined
48     Alias /robots.txt /var/www/cvs.robots.txt
49     Alias /static /usr/share/gitweb/static
50     Alias /git /var/lib/git
51     ScriptAlias / /usr/share/gitweb/gitweb.cgi
52     RedirectMatch permanent "^/~(.*)$" "http://example.org/~$1"
53 </VirtualHost>
55 Now git clone http://git.example.org/git/repo will work.  And if you
56 installed the gitweb package, http://git.example.org/ now will display a
57 list of repositories, making them accessible through a web browser.
59  -- Gerrit Pape <pape@smarden.org>  Fri, 15 Sep 2006 09:19:37 +0000