{"thread":{"id":"48976","subject":"Using Environment variable GIT_CONFIG does not work as expected","startedAt":"2018-07-30T09:06:02Z","lastAt":"2018-07-30T13:08:26Z","messageCount":2,"participants":["Mika Vesalainen","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"353854","messageId":"LNXP265MB0892616339D20CA9B10D6A31D42F0@LNXP265MB0892.GBRP265.PROD.OUTLOOK.COM","threadId":"48976","inReplyTo":null,"subject":"Using Environment variable GIT_CONFIG does not work as expected","fromName":"Mika Vesalainen","fromEmail":"mika.vesalainen@u-blox.com","sentAt":"2018-07-30T08:58:28Z","receivedAt":"2018-07-30T09:06:02Z","isPatch":false,"sender":{"key":"mika.vesalainen@u-blox.com","avatar":null},"body":"Hi,\n\nI 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.\n\nSo 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\".\nWhen this is done, \"git config -l\" will show correctly the user.name, user.email and other parameters which are set in \"my_specific_gitconfig\".\n\nHowever, if user tries now to create a commit the git blames:\n*** Please tell me who you are.\nand so on...\n\nBut running \"git config -l\" shows that 'user.name' and 'user.email' are properly configured.\nDo I need to configure something more in order to get this GIT_CONFIG environment variable working. I'm working in Debian Linux environment.\n\nI have tested this with git versions: 2.1.4, 2.11.0 and 2.18.0.321.gffc6fa0\n\nThanks,\nMika\n\n\n"},{"id":"353873","messageId":"20180730130757.22205-1-szeder.dev@gmail.com","threadId":"48976","inReplyTo":"LNXP265MB0892616339D20CA9B10D6A31D42F0@LNXP265MB0892.GBRP265.PROD.OUTLOOK.COM","subject":"Re: Using Environment variable GIT_CONFIG does not work as expected","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-07-30T13:07:57Z","receivedAt":"2018-07-30T13:08:26Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"> I have a shared linux account which is used by multiple developers.\n> But I would like to have git commit history configured so that I can\n> see who made a change to common repository (so that author of the\n> commit would be correct person, not shared user). There are reasons\n> why developers cannot clone this environment to their own accounts.\n> \n> So I don't have ~/.gitconfig in place for the shared user, and when\n> developer log in I enforce them to configure git for them first. They\n> must \"export GIT_CONFIG=my_specific_gitconfig\".\n> When this is done, \"git config -l\" will show correctly the user.name,\n> user.email and other parameters which are set in\n> \"my_specific_gitconfig\".\n> \n> However, if user tries now to create a commit the git blames:\n> *** Please tell me who you are.\n> and so on...\n> \n> But running \"git config -l\" shows that 'user.name' and 'user.email'\n> are properly configured.\n> Do I need to configure something more in order to get this GIT_CONFIG\n> environment variable working. I'm working in Debian Linux environment.\n\nI think it's working as intended, because GIT_CONFIG is only supposed\nto affect 'git config' and is only documented in the git-config(1) man\npage.  Perhaps the wording could be improved to be more explicit about\nthis.\n\nNote that more general environment variables affecting more git\ncommands are documented in git(1), and GIT_CONFIG is not mentioned\nthere.\n\nTry setting and exporting the environment variables GIT_AUTHOR_NAME,\nGIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL instead.\n\n> \n> I have tested this with git versions: 2.1.4, 2.11.0 and\n> 2.18.0.321.gffc6fa0\n"}]}