Re: git-daemon breakage in 1.5.4
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Feb 6, 2008, 09:40 UTC
- Message-ID
- <47A98092.2070509@viscovery.net>
- In-Reply-To
- <C8E50E14-B50F-4385-A581-B69262E8E6A5@wincent.com>
Wincent Colaiuta schrieb:
Show 17 quoted lines
> El 5/2/2008, a las 21:02, Junio C Hamano escribió: >> Perhaps you did not install git on the PATH processes launched >> by your inetd implementation would use? > > I don't know what PATH environment xinetd provides, but I can reproduce > this directly as follows from the command line without any involvement > from xientd: > > First, set up PATH with all the standard locations, with directories > under /usr/local specified first. Git 1.5.4 is installed in /usr/local/bin: > > # export > PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin > > This fails with the "remote end hung up unexpectedly" error: > > # /usr/local/bin/git-daemon --inetd --base-path=/blah -- /blah
If you run this from the command line, you can't expect it to do anything useful: It communicates with the client via stdin and stdout.
> Drop the --inetd option and it works with no errors: > > # /usr/local/bin/git-daemon --base-path=/blah -- /blah
When I run git-daemon with a reduced path similar to this:
PATH=/bin:/usr/bin /usr/local/bin/git-daemon ...
i.e. git is installed in /usr/local/bin, but it is not in PATH, then I also get "hung up unexpectedly" from a client that connects to this server.
Which makes me think that you xinetd doesn't pass a PATH to git-daemon that includes /usr/local/bin. Add this to your /etc/xinetd.d/git:
env = PATH=/bin:/usr/bin:/usr/local/bin
(not tested).
-- Hannes