Skip to content

Commit 714d258

Browse files
committed
doc: clarify that "git daemon --user=<user>" option does not export HOME=~user
The fact that we don't set $HOME may confuse admins who expect ~<user>/.gitconfig to be used, because that is not what we try to read. And worse, since 96b9e0e, a git-daemon started by root is likely to fail to run at all, as the user we switch to generally cannot read ~root. Signed-off-by: Jeff King <[email protected]> Helped-by: W. Trevor King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2137ce0 commit 714d258

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Documentation/git-daemon.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ OPTIONS
147147
Giving these options is an error when used with `--inetd`; use
148148
the facility of inet daemon to achieve the same before spawning
149149
'git daemon' if needed.
150+
+
151+
Like many programs that switch user id, the daemon does not reset
152+
environment variables such as `$HOME` when it runs git programs,
153+
e.g. `upload-pack` and `receive-pack`. When using this option, you
154+
may also want to set and export `HOME` to point at the home
155+
directory of `<user>` before starting the daemon, and make sure any
156+
Git configuration files in that directory are readable by `<user>`.
150157

151158
--enable=<service>::
152159
--disable=<service>::

0 commit comments

Comments
 (0)