git http-backend relies upon the CGI environment variables set
by the invoking web server, including:
The GIT_HTTP_EXPORT_ALL environment variable may be passed to
git-http-backend to bypass the check for the "git-daemon-export-ok"
file in each repository before allowing export of that repository.
The GIT_HTTP_MAX_REQUEST_BUFFER environment variable (or the
http.maxRequestBuffer config option) may be set to change the
largest ref negotiation request that git will handle during a fetch; any
fetch requiring a larger buffer will not succeed. This value should not
normally need to be changed, but may be helpful if you are fetching from
a repository with an extremely large number of refs. The value can be
specified with a unit (e.g., 100M for 100 megabytes). The default is
10 megabytes.
Clients may probe for optional protocol capabilities (like the v2
protocol) using the Git-Protocol HTTP header. In order to support
these, the contents of that header must appear in the GIT_PROTOCOL
environment variable. Most webservers will pass this header to the CGI
via the HTTP_GIT_PROTOCOL variable, and git-http-backend will
automatically copy that to GIT_PROTOCOL. However, some webservers may
be more selective about which headers they’ll pass, in which case they
need to be configured explicitly (see the mention of Git-Protocol in
the Apache config from the earlier EXAMPLES section).
The backend process sets GIT_COMMITTER_NAME to $REMOTE_USER and
GIT_COMMITTER_EMAIL to ${REMOTE_USER}@http.${REMOTE_ADDR},
ensuring that any reflogs created by git-receive-pack contain some
identifying information of the remote user who performed the push.
All CGI environment variables are available to each of the hooks
invoked by the git-receive-pack.