Documentation / git-daemon.txton commit gitk(1): mention --all (44d2775)
   1git-daemon(1)
   2=============
   3
   4NAME
   5----
   6git-daemon - A really simple server for git repositories
   7
   8SYNOPSIS
   9--------
  10[verse]
  11'git-daemon' [--verbose] [--syslog] [--inetd | --port=n] [--export-all]
  12             [--timeout=n] [--init-timeout=n] [--strict-paths]
  13             [--base-path=path] [--user-path | --user-path=path]
  14             [--enable=service] [--disable=service]
  15             [--allow-override=service] [--forbid-override=service]
  16             [--reuseaddr] [--detach] [--pid-file=file]
  17             [--user=user [--group=group]] [directory...]
  18
  19DESCRIPTION
  20-----------
  21A really simple TCP git daemon that normally listens on port "DEFAULT_GIT_PORT"
  22aka 9418.  It waits for a connection asking for a service, and will serve
  23that service if it is enabled.
  24
  25It verifies that the directory has the magic file "git-daemon-export-ok", and
  26it will refuse to export any git directory that hasn't explicitly been marked
  27for export this way (unless the '--export-all' parameter is specified). If you
  28pass some directory paths as 'git-daemon' arguments, you can further restrict
  29the offers to a whitelist comprising of those.
  30
  31By default, only `upload-pack` service is enabled, which serves
  32`git-fetch-pack` and `git-peek-remote` clients that are invoked
  33from `git-fetch`, `git-ls-remote`, and `git-clone`.
  34
  35This is ideally suited for read-only updates, i.e., pulling from
  36git repositories.
  37
  38OPTIONS
  39-------
  40--strict-paths::
  41        Match paths exactly (i.e. don't allow "/foo/repo" when the real path is
  42        "/foo/repo.git" or "/foo/repo/.git") and don't do user-relative paths.
  43        git-daemon will refuse to start when this option is enabled and no
  44        whitelist is specified.
  45
  46--base-path::
  47        Remap all the path requests as relative to the given path.
  48        This is sort of "GIT root" - if you run git-daemon with
  49        '--base-path=/srv/git' on example.com, then if you later try to pull
  50        'git://example.com/hello.git', `git-daemon` will interpret the path
  51        as '/srv/git/hello.git'.
  52
  53--export-all::
  54        Allow pulling from all directories that look like GIT repositories
  55        (have the 'objects' and 'refs' subdirectories), even if they
  56        do not have the 'git-daemon-export-ok' file.
  57
  58--inetd::
  59        Have the server run as an inetd service. Implies --syslog.
  60
  61--port::
  62        Listen on an alternative port.
  63
  64--init-timeout::
  65        Timeout between the moment the connection is established and the
  66        client request is received (typically a rather low value, since
  67        that should be basically immediate).
  68
  69--timeout::
  70        Timeout for specific client sub-requests. This includes the time
  71        it takes for the server to process the sub-request and time spent
  72        waiting for next client's request.
  73
  74--syslog::
  75        Log to syslog instead of stderr. Note that this option does not imply
  76        --verbose, thus by default only error conditions will be logged.
  77
  78--user-path, --user-path=path::
  79        Allow ~user notation to be used in requests.  When
  80        specified with no parameter, requests to
  81        git://host/~alice/foo is taken as a request to access
  82        'foo' repository in the home directory of user `alice`.
  83        If `--user-path=path` is specified, the same request is
  84        taken as a request to access `path/foo` repository in
  85        the home directory of user `alice`.
  86
  87--verbose::
  88        Log details about the incoming connections and requested files.
  89
  90--reuseaddr::
  91        Use SO_REUSEADDR when binding the listening socket.
  92        This allows the server to restart without waiting for
  93        old connections to time out.
  94
  95--detach::
  96        Detach from the shell. Implies --syslog.
  97
  98--pid-file=file::
  99        Save the process id in 'file'.
 100
 101--user=user, --group=group::
 102        Change daemon's uid and gid before entering the service loop.
 103        When only `--user` is given without `--group`, the
 104        primary group ID for the user is used.  The values of
 105        the option are given to `getpwnam(3)` and `getgrnam(3)`
 106        and numeric IDs are not supported.
 107+
 108Giving these options is an error when used with `--inetd`; use
 109the facility of inet daemon to achieve the same before spawning
 110`git-daemon` if needed.
 111
 112--enable-service, --disable-service::
 113        Enable/disable the service site-wide per default.  Note
 114        that a service disabled site-wide can still be enabled
 115        per repository if it is marked overridable and the
 116        repository enables the service with an configuration
 117        item.
 118
 119--allow-override, --forbid-override::
 120        Allow/forbid overriding the site-wide default with per
 121        repository configuration.  By default, all the services
 122        are overridable.
 123
 124<directory>::
 125        A directory to add to the whitelist of allowed directories. Unless
 126        --strict-paths is specified this will also include subdirectories
 127        of each named directory.
 128
 129SERVICES
 130--------
 131
 132upload-pack::
 133        This serves `git-fetch-pack` and `git-peek-remote`
 134        clients.  It is enabled by default, but a repository can
 135        disable it by setting `daemon.uploadpack` configuration
 136        item to `false`.
 137
 138Author
 139------
 140Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki
 141<yoshfuji@linux-ipv6.org> and the git-list <git@vger.kernel.org>
 142
 143Documentation
 144--------------
 145Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 146
 147GIT
 148---
 149Part of the gitlink:git[7] suite
 150