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

Using Environment variable GIT_CONFIG does not work as expected

From
MVMika Vesalainen <mika.vesalainen@u-blox.com>
Date
Jul 30, 2018, 08:58 UTC
Message-ID
<LNXP265MB0892616339D20CA9B10D6A31D42F0@LNXP265MB0892.GBRP265.PROD.OUTLOOK.COM>
Hi,
I have a shared linux account which is used by multiple developers. But I would like to have git commit history configured so that I can see who made a change to common repository (so that author of the commit would be correct person, not shared user). There are reasons why developers cannot clone this environment to their own accounts.

So I don't have ~/.gitconfig in place for the shared user, and when developer log in I enforce them to configure git for them first. They must "export GIT_CONFIG=my_specific_gitconfig". When this is done, "git config -l" will show correctly the user.name, user.email and other parameters which are set in "my_specific_gitconfig".

However, if user tries now to create a commit the git blames: *** Please tell me who you are. and so on...

But running "git config -l" shows that 'user.name' and 'user.email' are properly configured. Do I need to configure something more in order to get this GIT_CONFIG environment variable working. I'm working in Debian Linux environment.

I have tested this with git versions: 2.1.4, 2.11.0 and 2.18.0.321.gffc6fa0

Thanks, Mika

Next: SZEDER Gábor
Message 1 of 2 in “Using Environment variable GIT_CONFIG does not work as expected”
  1. Mika VesalainenJul 30, 2018
  2. SZEDER GáborJul 30, 2018

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.