path: root/Documentation/git-daemon.txt
diff options
authorJoey Hess <>2008-10-24 05:48:50 (GMT)
committerJunio C Hamano <>2008-10-24 23:34:01 (GMT)
commit53ffb878a94c3eae7c7f57e05568aedcfb77e57f (patch)
treebb5eca12073ff0b85feaa22f122144a079bc0a84 /Documentation/git-daemon.txt
parent759ad19e772a79a2a5ae6b7377d57eb21d29e6a0 (diff)
git-daemon: set REMOTE_ADDR to client address
This allows hooks like pre-receive to look at the client's IP address. Of course the IP address can't be used to get strong security; git-daemon isn't the right thing to use if you need that. However, basic IP address checking can be good enough in some situations. REMOTE_ADDR is the same environment variable used to communicate the client's address to CGI scripts. Signed-off-by: Joey Hess <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-daemon.txt')
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt
index b08a08c..f1a570a 100644
--- a/Documentation/git-daemon.txt
+++ b/Documentation/git-daemon.txt
@@ -270,6 +270,15 @@ selectively enable/disable services per repository::
+'git-daemon' will set REMOTE_ADDR to the IP address of the client
+that connected to it, if the IP address is available. REMOTE_ADDR will
+be available in the environment of hooks called when
+services are performed.
Written by Linus Torvalds <>, YOSHIFUJI Hideaki