All of lore.kernel.org
 help / color / mirror / Atom feed
* How to avoid "Please tell me who you are..."?
@ 2017-06-02  6:02 Jeffrey Walton
       [not found] ` <532E194B-3A76-4416-A652-4B1DCE78AB8A@gmail.com>
  2017-06-02  7:00 ` Konstantin Khomoutov
  0 siblings, 2 replies; 8+ messages in thread
From: Jeffrey Walton @ 2017-06-02  6:02 UTC (permalink / raw)
  To: Git List

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.

    Run

      git config --global user.email "you@example.com"
      git config --global user.name "Your Name"

    to set your account's default identity.
    Omit --global to set the identity only in this repository.

This is a nameless test account, so there is no information to provide.

How do I tell Git to ignore these checks?

Thanks in advance.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to avoid "Please tell me who you are..."?
       [not found] ` <532E194B-3A76-4416-A652-4B1DCE78AB8A@gmail.com>
@ 2017-06-02  6:37   ` Jeffrey Walton
  2017-06-06 22:32     ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrey Walton @ 2017-06-02  6:37 UTC (permalink / raw)
  To: Davide Fiorentino; +Cc: Git List

On Fri, Jun 2, 2017 at 2:30 AM, Davide Fiorentino
<davide.fiorentino@gmail.com> wrote:
> Is there a reason why you don't want or can't set those details?

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.

Jeff

> On June 2, 2017 7:02:22 AM GMT+01:00, Jeffrey Walton <noloader@gmail.com>
> 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.
>>
>>     Run
>>
>>       git config --global user.email "you@example.com"
>>       git config --global user.name "Your Name"
>>
>>     to set your account's default identity.
>>     Omit --global to set the identity only in this repository.
>>
>> This is a nameless test account, so there is no information to provide.
>>
>> How do I tell Git to ignore these checks?
>>
>> Thanks in advance.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to avoid "Please tell me who you are..."?
  2017-06-02  6:02 How to avoid "Please tell me who you are..."? Jeffrey Walton
       [not found] ` <532E194B-3A76-4416-A652-4B1DCE78AB8A@gmail.com>
@ 2017-06-02  7:00 ` Konstantin Khomoutov
  2017-06-02  7:07   ` Jeffrey Walton
  1 sibling, 1 reply; 8+ messages in thread
From: Konstantin Khomoutov @ 2017-06-02  7:00 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: Git List, Davide Fiorentino

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).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to avoid "Please tell me who you are..."?
  2017-06-02  7:00 ` Konstantin Khomoutov
@ 2017-06-02  7:07   ` Jeffrey Walton
  2017-06-02  7:15     ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrey Walton @ 2017-06-02  7:07 UTC (permalink / raw)
  To: Konstantin Khomoutov; +Cc: Git List

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to avoid "Please tell me who you are..."?
  2017-06-02  7:07   ` Jeffrey Walton
@ 2017-06-02  7:15     ` Junio C Hamano
  2017-06-02  7:38       ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2017-06-02  7:15 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: Konstantin Khomoutov, Git List

Jeffrey Walton <noloader@gmail.com> writes:

> Is there no switch? Its the most efficient way to accomplish the task.

This is a safety to help normal human users from hurting themselves,
and it does not make any sense to have "I have no name, so record
garbage, please" option, switch or setting that is different from
"Here is the name I want you to use when recording things".

The switch _is_ to set the names with whatever standard way.  

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to avoid "Please tell me who you are..."?
  2017-06-02  7:15     ` Junio C Hamano
@ 2017-06-02  7:38       ` Ævar Arnfjörð Bjarmason
  2017-06-02 23:50         ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-06-02  7:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeffrey Walton, Konstantin Khomoutov, Git List

On Fri, Jun 2, 2017 at 9:15 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Jeffrey Walton <noloader@gmail.com> writes:
>
>> Is there no switch? Its the most efficient way to accomplish the task.
>
> This is a safety to help normal human users from hurting themselves,
> and it does not make any sense to have "I have no name, so record
> garbage, please" option, switch or setting that is different from
> "Here is the name I want you to use when recording things".
>
> The switch _is_ to set the names with whatever standard way.

Presumably OP doesn't want to mess with the env for whatever reason,
in that case:

    git -c user.name=Nobody -c user.email=nobody@example.com
cherry-pick <commit>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to avoid "Please tell me who you are..."?
  2017-06-02  7:38       ` Ævar Arnfjörð Bjarmason
@ 2017-06-02 23:50         ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2017-06-02 23:50 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Jeffrey Walton, Konstantin Khomoutov, Git List

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Fri, Jun 2, 2017 at 9:15 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Jeffrey Walton <noloader@gmail.com> writes:
>>
>>> Is there no switch? Its the most efficient way to accomplish the task.
>>
>> This is a safety to help normal human users from hurting themselves,
>> and it does not make any sense to have "I have no name, so record
>> garbage, please" option, switch or setting that is different from
>> "Here is the name I want you to use when recording things".
>>
>> The switch _is_ to set the names with whatever standard way.
>
> Presumably OP doesn't want to mess with the env for whatever reason,
> in that case:
>
>     git -c user.name=Nobody -c user.email=nobody@example.com
> cherry-pick <commit>

Exactly.  That is what I meant as one of the "whatever standard
way".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to avoid "Please tell me who you are..."?
  2017-06-02  6:37   ` Jeffrey Walton
@ 2017-06-06 22:32     ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2017-06-06 22:32 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: Davide Fiorentino, Git List

Jeffrey Walton <noloader@gmail.com> writes:

> On Fri, Jun 2, 2017 at 2:30 AM, Davide Fiorentino
> <davide.fiorentino@gmail.com> wrote:
>> Is there a reason why you don't want or can't set those details?
>
> 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.

One thing I forgot to ask you.  Are you reporting "I have used this
exact procedure to set up a test machine in the past and did not
have this problem, but with newer Git I get this message and cannot
cherry-pick or tag or do anything"?  Or is this something you
noticed with a version of Git you happened to have?

I am trying to make sure this is not reporting a regression, as I am
not aware of any recent change that wanted to make the "unconfigured
user" detection stricter than before.

Thanks.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-06 22:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02  6:02 How to avoid "Please tell me who you are..."? Jeffrey Walton
     [not found] ` <532E194B-3A76-4416-A652-4B1DCE78AB8A@gmail.com>
2017-06-02  6:37   ` Jeffrey Walton
2017-06-06 22:32     ` Junio C Hamano
2017-06-02  7:00 ` Konstantin Khomoutov
2017-06-02  7:07   ` Jeffrey Walton
2017-06-02  7:15     ` Junio C Hamano
2017-06-02  7:38       ` Ævar Arnfjörð Bjarmason
2017-06-02 23:50         ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.