{"thread":{"id":"46096","subject":"How to avoid \"Please tell me who you are...\"?","startedAt":"2017-06-02T06:02:28Z","lastAt":"2017-06-06T22:32:53Z","messageCount":8,"participants":["Jeffrey Walton","Konstantin Khomoutov","Junio C Hamano","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"321387","messageId":"CAH8yC8mjTXQ_5uRedHi=fytKtQttyq_WemGFNQTP9C3PK4x5cQ@mail.gmail.com","threadId":"46096","inReplyTo":null,"subject":"How to avoid \"Please tell me who you are...\"?","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2017-06-02T06:02:22Z","receivedAt":"2017-06-02T06:02:28Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"I'm working on a test machine. It mostly needs to be a clone of\nupstream. On occasion it needs to test a particular commit.\n\nWhen I attempt to test a commit it produces:\n\n    $ git cherry-pick eb3b27a6a543\n\n    *** Please tell me who you are.\n\n    Run\n\n      git config --global user.email \"you@example.com\"\n      git config --global user.name \"Your Name\"\n\n    to set your account's default identity.\n    Omit --global to set the identity only in this repository.\n\nThis is a nameless test account, so there is no information to provide.\n\nHow do I tell Git to ignore these checks?\n\nThanks in advance.\n"},{"id":"321388","messageId":"CAH8yC8k9pJHLuzWneb4aRAEF2zOTCVO_5YJxrCpw28x8bDox0A@mail.gmail.com","threadId":"46096","inReplyTo":"532E194B-3A76-4416-A652-4B1DCE78AB8A@gmail.com","subject":"Re: How to avoid \"Please tell me who you are...\"?","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2017-06-02T06:37:40Z","receivedAt":"2017-06-02T06:38:04Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"On Fri, Jun 2, 2017 at 2:30 AM, Davide Fiorentino\n<davide.fiorentino@gmail.com> wrote:\n> Is there a reason why you don't want or can't set those details?\n\nWell, they don't exist so there's nothing to set.\n\nThe machine below its a CubieBoard used for testing. I remote into it\nwith test@. As a matter of policy, no check-ins occur on it. Other\nthan the password database and authroized_keys file, there is no\ninformation on it to be lost or stolen.\n\nJeff\n\n> On June 2, 2017 7:02:22 AM GMT+01:00, Jeffrey Walton <noloader@gmail.com>\n> wrote:\n>>\n>> I'm working on a test machine. It mostly needs to be a clone of\n>> upstream. On occasion it needs to test a particular commit.\n>>\n>> When I attempt to test a commit it produces:\n>>\n>>     $ git cherry-pick eb3b27a6a543\n>>\n>>     *** Please tell me who you are.\n>>\n>>     Run\n>>\n>>       git config --global user.email \"you@example.com\"\n>>       git config --global user.name \"Your Name\"\n>>\n>>     to set your account's default identity.\n>>     Omit --global to set the identity only in this repository.\n>>\n>> This is a nameless test account, so there is no information to provide.\n>>\n>> How do I tell Git to ignore these checks?\n>>\n>> Thanks in advance.\n"},{"id":"321391","messageId":"20170602070052.3lq22arcncuh6rrl@tigra","threadId":"46096","inReplyTo":"CAH8yC8k9pJHLuzWneb4aRAEF2zOTCVO_5YJxrCpw28x8bDox0A@mail.gmail.com","subject":"Re: How to avoid \"Please tell me who you are...\"?","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2017-06-02T07:00:52Z","receivedAt":"2017-06-02T07:00:59Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Fri, Jun 02, 2017 at 02:02:22AM -0400, Jeffrey Walton wrote:\n\n> I'm working on a test machine. It mostly needs to be a clone of\n> upstream. On occasion it needs to test a particular commit.\n> \n> When I attempt to test a commit it produces:\n> \n>     $ git cherry-pick eb3b27a6a543\n> \n>     *** Please tell me who you are.\n[...]\n> This is a nameless test account, so there is no information to provide.\n> \n> How do I tell Git to ignore these checks?\n[...]\n> Well, they don't exist so there's nothing to set.\n> \n> The machine below its a CubieBoard used for testing. I remote into it\n> with test@. As a matter of policy, no check-ins occur on it. Other\n> than the password database and authroized_keys file, there is no\n> information on it to be lost or stolen.\n\n`git cherry-pick` wants to record a commit.  A commit in Git always\npossess the information on \"the committer\" -- whoever recorded the\ncommit (it might be distinct from the commit author, as is the case with\ncherry-picking).  There's no way to not set the committer.\n\nI envision two ways to get around this situation:\n\n1) Patch the ~/.whatevershellrc of your test account to set this\n   information by setting and exporting the GIT_AUTHOR_NAME and\n   GIT_AUTHOR_EMAIL env. variables (and may be others -- see the\n   \"git\" manual page; run `git help git`).\n   \n   May be even add it in /etc/skel to make all accounts create inherit\n   it.\n\n2) Set these parameters in the repository you're working with.\n\n   While Git suggests you to pass \"--global\" to the `git config`\n   invocations, it's perfectly OK to use \"--local\" with them (which is\n   IIRC the default, if not supplied) to make these settings be recorded\n   in the repository's configuration rather than in ~/.gitconfig.\n\n3) Pass these options explicitly to Git invocations or make a shell\n   alias which would do so, like with\n\n   function git() {\n     command git \\\n\t\t-c user.name='Joe Tester' \\\n\t\t-c user.email=tester@acme.corp \\\n\t\t\"$@\"\n   }\n\nI'd personally go with (2).\n\n"},{"id":"321392","messageId":"CAH8yC8nGR1heD9_xRuHRG-oerdoQr6Pi8mT=ZpFhoeH6LaFK2w@mail.gmail.com","threadId":"46096","inReplyTo":"20170602070052.3lq22arcncuh6rrl@tigra","subject":"Re: How to avoid \"Please tell me who you are...\"?","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2017-06-02T07:07:11Z","receivedAt":"2017-06-02T07:08:29Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"On Fri, Jun 2, 2017 at 3:00 AM, Konstantin Khomoutov\n<kostix+git@007spb.ru> wrote:\n> On Fri, Jun 02, 2017 at 02:02:22AM -0400, Jeffrey Walton wrote:\n>\n>> I'm working on a test machine. It mostly needs to be a clone of\n>> upstream. On occasion it needs to test a particular commit.\n>>\n>> When I attempt to test a commit it produces:\n>>\n>>     $ git cherry-pick eb3b27a6a543\n>>\n>>     *** Please tell me who you are.\n> [...]\n>> This is a nameless test account, so there is no information to provide.\n>>\n>> How do I tell Git to ignore these checks?\n> [...]\n>> Well, they don't exist so there's nothing to set.\n>>\n>> The machine below its a CubieBoard used for testing. I remote into it\n>> with test@. As a matter of policy, no check-ins occur on it. Other\n>> than the password database and authroized_keys file, there is no\n>> information on it to be lost or stolen.\n>\n> `git cherry-pick` wants to record a commit.  A commit in Git always\n> possess the information on \"the committer\" -- whoever recorded the\n> commit (it might be distinct from the commit author, as is the case with\n> cherry-picking).  There's no way to not set the committer.\n>\n> I envision two ways to get around this situation:\n>\n> 1) Patch the ~/.whatevershellrc of your test account to set this\n>    information by setting and exporting the GIT_AUTHOR_NAME and\n>    GIT_AUTHOR_EMAIL env. variables (and may be others -- see the\n>    \"git\" manual page; run `git help git`).\n>\n>    May be even add it in /etc/skel to make all accounts create inherit\n>    it.\n>\n> 2) Set these parameters in the repository you're working with.\n>\n>    While Git suggests you to pass \"--global\" to the `git config`\n>    invocations, it's perfectly OK to use \"--local\" with them (which is\n>    IIRC the default, if not supplied) to make these settings be recorded\n>    in the repository's configuration rather than in ~/.gitconfig.\n>\n> 3) Pass these options explicitly to Git invocations or make a shell\n>    alias which would do so, like with\n>\n>    function git() {\n>      command git \\\n>                 -c user.name='Joe Tester' \\\n>                 -c user.email=tester@acme.corp \\\n>                 \"$@\"\n>    }\n>\n> I'd personally go with (2).\n\nThanks.\n\nIs there no switch? Its the most efficient way to accomplish the task.\n\nJeff\n"},{"id":"321393","messageId":"xmqqy3tayi53.fsf@gitster.mtv.corp.google.com","threadId":"46096","inReplyTo":"CAH8yC8nGR1heD9_xRuHRG-oerdoQr6Pi8mT=ZpFhoeH6LaFK2w@mail.gmail.com","subject":"Re: How to avoid \"Please tell me who you are...\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-02T07:15:52Z","receivedAt":"2017-06-02T07:16:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeffrey Walton <noloader@gmail.com> writes:\n\n> Is there no switch? Its the most efficient way to accomplish the task.\n\nThis is a safety to help normal human users from hurting themselves,\nand it does not make any sense to have \"I have no name, so record\ngarbage, please\" option, switch or setting that is different from\n\"Here is the name I want you to use when recording things\".\n\nThe switch _is_ to set the names with whatever standard way.  \n"},{"id":"321395","messageId":"CACBZZX4vEOD-4a-eK-uBxmFrb1GLSvJKxHW51whCSbCZdh7amQ@mail.gmail.com","threadId":"46096","inReplyTo":"xmqqy3tayi53.fsf@gitster.mtv.corp.google.com","subject":"Re: How to avoid \"Please tell me who you are...\"?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-06-02T07:38:52Z","receivedAt":"2017-06-02T07:40:30Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, Jun 2, 2017 at 9:15 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Jeffrey Walton <noloader@gmail.com> writes:\n>\n>> Is there no switch? Its the most efficient way to accomplish the task.\n>\n> This is a safety to help normal human users from hurting themselves,\n> and it does not make any sense to have \"I have no name, so record\n> garbage, please\" option, switch or setting that is different from\n> \"Here is the name I want you to use when recording things\".\n>\n> The switch _is_ to set the names with whatever standard way.\n\nPresumably OP doesn't want to mess with the env for whatever reason,\nin that case:\n\n    git -c user.name=Nobody -c user.email=nobody@example.com\ncherry-pick <commit>\n"},{"id":"321461","messageId":"xmqqh8zyx833.fsf@gitster.mtv.corp.google.com","threadId":"46096","inReplyTo":"CACBZZX4vEOD-4a-eK-uBxmFrb1GLSvJKxHW51whCSbCZdh7amQ@mail.gmail.com","subject":"Re: How to avoid \"Please tell me who you are...\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-02T23:50:40Z","receivedAt":"2017-06-02T23:51:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Fri, Jun 2, 2017 at 9:15 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Jeffrey Walton <noloader@gmail.com> writes:\n>>\n>>> Is there no switch? Its the most efficient way to accomplish the task.\n>>\n>> This is a safety to help normal human users from hurting themselves,\n>> and it does not make any sense to have \"I have no name, so record\n>> garbage, please\" option, switch or setting that is different from\n>> \"Here is the name I want you to use when recording things\".\n>>\n>> The switch _is_ to set the names with whatever standard way.\n>\n> Presumably OP doesn't want to mess with the env for whatever reason,\n> in that case:\n>\n>     git -c user.name=Nobody -c user.email=nobody@example.com\n> cherry-pick <commit>\n\nExactly.  That is what I meant as one of the \"whatever standard\nway\".\n"},{"id":"321652","messageId":"xmqqefuw927l.fsf@gitster.mtv.corp.google.com","threadId":"46096","inReplyTo":"CAH8yC8k9pJHLuzWneb4aRAEF2zOTCVO_5YJxrCpw28x8bDox0A@mail.gmail.com","subject":"Re: How to avoid \"Please tell me who you are...\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-06T22:32:46Z","receivedAt":"2017-06-06T22:32:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeffrey Walton <noloader@gmail.com> writes:\n\n> On Fri, Jun 2, 2017 at 2:30 AM, Davide Fiorentino\n> <davide.fiorentino@gmail.com> wrote:\n>> Is there a reason why you don't want or can't set those details?\n>\n> Well, they don't exist so there's nothing to set.\n>\n> The machine below its a CubieBoard used for testing. I remote into it\n> with test@. As a matter of policy, no check-ins occur on it. Other\n> than the password database and authroized_keys file, there is no\n> information on it to be lost or stolen.\n\nOne thing I forgot to ask you.  Are you reporting \"I have used this\nexact procedure to set up a test machine in the past and did not\nhave this problem, but with newer Git I get this message and cannot\ncherry-pick or tag or do anything\"?  Or is this something you\nnoticed with a version of Git you happened to have?\n\nI am trying to make sure this is not reporting a regression, as I am\nnot aware of any recent change that wanted to make the \"unconfigured\nuser\" detection stricter than before.\n\nThanks.\n\n"}]}