Re: git-daemon not consulting ~/.gitconfig
- From
- Konstantin Khomoutov <kostix@bswap.ru>
- Date
- Dec 4, 2024, 15:57 UTC
- Message-ID
- <20241204155704.sxti6mn7zyr3vmyt@carbon>
- In-Reply-To
- <fj5vgwmc5wtyzcxxnmcgw7whclm6qf7p5sxzh3nbao3feyutj6@daizbooxk22j>
On Wed, Dec 04, 2024 at 11:23:36AM +0100, martin f krafft wrote:
[...]
Show 6 quoted lines
> in the logs. However, adding the config to `~gitdaemon/.gitconfig` did not > have the desired effect. Neither did adding it to `~root/.gitconfig` and > only `/etc/gitconfig` works. > > So I checked `strace` and found that when invoked by `git-daemon`, Git > doesn't even consult `~/.gitconfig`, and I think this may be a bug.
[...]
Given the following passage from the docs, describing the "--user" option,
| Like many programs that switch user id, the daemon does not reset | environment variables such as $HOME when it runs git programs, e.g. | upload-pack and receive-pack. When using this option, you may also want to | set and export HOME to point at the home directory of <user> before starting | the daemon, and make sure any Git configuration files in that directory are | readable by <user>.
the behavior does indeed look like a bug.