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

Re: How to avoid "Please tell me who you are..."?

From
JWJeffrey Walton <noloader@gmail.com>
Date
Jun 2, 2017, 07:07 UTC
Message-ID
<CAH8yC8nGR1heD9_xRuHRG-oerdoQr6Pi8mT=ZpFhoeH6LaFK2w@mail.gmail.com>
In-Reply-To
<20170602070052.3lq22arcncuh6rrl@tigra>

On Fri, Jun 2, 2017 at 3:00 AM, Konstantin Khomoutov <kostix+git@007spb.ru> wrote:

Show 55 quoted lines
> On Fri, Jun 02, 2017 at 02:02:22AM -0400, Jeffrey Walton wrote:
>
>> I'm working on a test machine. It mostly needs to be a clone of
>> upstream. On occasion it needs to test a particular commit.
>>
>> When I attempt to test a commit it produces:
>>
>>     $ git cherry-pick eb3b27a6a543
>>
>>     *** Please tell me who you are.
> [...]
>> This is a nameless test account, so there is no information to provide.
>>
>> How do I tell Git to ignore these checks?
> [...]
>> Well, they don't exist so there's nothing to set.
>>
>> The machine below its a CubieBoard used for testing. I remote into it
>> with test@. As a matter of policy, no check-ins occur on it. Other
>> than the password database and authroized_keys file, there is no
>> information on it to be lost or stolen.
>
> `git cherry-pick` wants to record a commit.  A commit in Git always
> possess the information on "the committer" -- whoever recorded the
> commit (it might be distinct from the commit author, as is the case with
> cherry-picking).  There's no way to not set the committer.
>
> I envision two ways to get around this situation:
>
> 1) Patch the ~/.whatevershellrc of your test account to set this
>    information by setting and exporting the GIT_AUTHOR_NAME and
>    GIT_AUTHOR_EMAIL env. variables (and may be others -- see the
>    "git" manual page; run `git help git`).
>
>    May be even add it in /etc/skel to make all accounts create inherit
>    it.
>
> 2) Set these parameters in the repository you're working with.
>
>    While Git suggests you to pass "--global" to the `git config`
>    invocations, it's perfectly OK to use "--local" with them (which is
>    IIRC the default, if not supplied) to make these settings be recorded
>    in the repository's configuration rather than in ~/.gitconfig.
>
> 3) Pass these options explicitly to Git invocations or make a shell
>    alias which would do so, like with
>
>    function git() {
>      command git \
>                 -c user.name='Joe Tester' \
>                 -c user.email=tester@acme.corp \
>                 "$@"
>    }
>
> I'd personally go with (2).
Thanks.
Is there no switch? Its the most efficient way to accomplish the task.
Jeff
Previous: Konstantin KhomoutovNext: Junio C Hamano
Message 4 of 8 in “How to avoid "Please tell me who you are..."?”
  1. Jeffrey WaltonJun 2, 2017
  2. Jeffrey WaltonJun 2, 2017
  3. Konstantin KhomoutovJun 2, 2017
  4. Jeffrey WaltonJun 2, 2017
  5. Junio C HamanoJun 2, 2017
  6. Ævar Arnfjörð BjarmasonJun 2, 2017
  7. Junio C HamanoJun 2, 2017
  8. Junio C HamanoJun 6, 2017

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.