git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-daemon not consulting ~/.gitconfig

From
KKKonstantin 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.
Previous: martin f krafft
Message 2 of 2 in “git-daemon not consulting ~/.gitconfig”
  1. martin f krafftDec 4, 2024
  2. Konstantin KhomoutovDec 4, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.