# How to force explicit user info

5 messages from 2008-03-05 to 2008-03-05. Participants: Santi Béjar, Jakub Narebski, Daniel Barkalow.
Thread: https://gitlist.dev/t/12516

## Santi Béjar, 2008-03-05 13:39

Subject: How to force explicit user info
Message-ID: <8aa486160803050539p4c443302nc322241d59fe9374@mail.gmail.com>
URL: https://gitlist.dev/e/8aa486160803050539p4c443302nc322241d59fe9374%40mail.gmail.com

```
Hi  *,


  how can I forbid the gecos info and always force git to ask for an
explicit user.name and user.email?

  I use a different email for personal projects and for work projects,
using the same machine. So I set user.email locally in each
repository. But when I forget setting this I get
userid@hostname.(none) as the email. Is there a way to just die and
ask for this info (maybe user.AlwaysExplicit or something like that)?

  Thanks

  Santi

```

## Jakub Narebski, 2008-03-05 14:38

Subject: Re: How to force explicit user info
Message-ID: <m3r6epgrqt.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3r6epgrqt.fsf%40localhost.localdomain
In-Reply-To: <8aa486160803050539p4c443302nc322241d59fe9374@mail.gmail.com>

```
"Santi Béjar" <sbejar@gmail.com> writes:

>   How can I forbid the gecos info and always force git to ask for an
> explicit user.name and user.email?
> 
>   I use a different email for personal projects and for work projects,
> using the same machine. So I set user.email locally in each
> repository. But when I forget setting this I get
> userid@hostname.(none) as the email. Is there a way to just die and
> ask for this info (maybe user.AlwaysExplicit or something like that)?

I don't think there is a way to get exactly what you want... unless
you would "scratch that itch"... :-)

You can set default user.name and user.email in the ~/.gitconfig
global (user) git configuration, and in /etc/gitconfig for system-wide
git config, though. HTH.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Daniel Barkalow, 2008-03-05 14:45

Subject: Re: How to force explicit user info
Message-ID: <alpine.LNX.1.00.0803050943070.19665@iabervon.org>
URL: https://gitlist.dev/e/alpine.LNX.1.00.0803050943070.19665%40iabervon.org
In-Reply-To: <8aa486160803050539p4c443302nc322241d59fe9374@mail.gmail.com>

```
On Wed, 5 Mar 2008, Santi Béjar wrote:

> Hi  *,
> 
> 
>   how can I forbid the gecos info and always force git to ask for an
> explicit user.name and user.email?
> 
>   I use a different email for personal projects and for work projects,
> using the same machine. So I set user.email locally in each
> repository. But when I forget setting this I get
> userid@hostname.(none) as the email. Is there a way to just die and
> ask for this info (maybe user.AlwaysExplicit or something like that)?

It doesn't work now, but I think a global:

[user]
	name

Could usefully be made to disable the default.

	-Daniel
*This .sig left intentionally blank*
```

## Santi Béjar, 2008-03-05 14:46

Subject: Re: How to force explicit user info
Message-ID: <8aa486160803050646m1dcceaf7y702dca453068f073@mail.gmail.com>
URL: https://gitlist.dev/e/8aa486160803050646m1dcceaf7y702dca453068f073%40mail.gmail.com
In-Reply-To: <m3r6epgrqt.fsf@localhost.localdomain>

```
On Wed, Mar 5, 2008 at 3:38 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>
> "Santi Béjar" <sbejar@gmail.com> writes:
>
>  >   How can I forbid the gecos info and always force git to ask for an
>  > explicit user.name and user.email?
>  >
>  >   I use a different email for personal projects and for work projects,
>  > using the same machine. So I set user.email locally in each
>  > repository. But when I forget setting this I get
>  > userid@hostname.(none) as the email. Is there a way to just die and
>  > ask for this info (maybe user.AlwaysExplicit or something like that)?
>
>  I don't think there is a way to get exactly what you want... unless
>  you would "scratch that itch"... :-)

Yes, I'll add this to my todo.

>
>  You can set default user.name and user.email in the ~/.gitconfig
>  global (user) git configuration, and in /etc/gitconfig for system-wide
>  git config, though. HTH.

But I don't want a default user.{name,email}.

Santi




>
>  --
>  Jakub Narebski
>  Poland
>  ShadeHawk on #git
>

```

## Santi Béjar, 2008-03-05 14:48

Subject: Re: How to force explicit user info
Message-ID: <8aa486160803050648v2fe2bfwb0711e81b162cba3@mail.gmail.com>
URL: https://gitlist.dev/e/8aa486160803050648v2fe2bfwb0711e81b162cba3%40mail.gmail.com
In-Reply-To: <alpine.LNX.1.00.0803050943070.19665@iabervon.org>

```
On Wed, Mar 5, 2008 at 3:45 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
>
> On Wed, 5 Mar 2008, Santi Béjar wrote:
>
>  > Hi  *,
>  >
>  >
>  >   how can I forbid the gecos info and always force git to ask for an
>  > explicit user.name and user.email?
>  >
>  >   I use a different email for personal projects and for work projects,
>  > using the same machine. So I set user.email locally in each
>  > repository. But when I forget setting this I get
>  > userid@hostname.(none) as the email. Is there a way to just die and
>  > ask for this info (maybe user.AlwaysExplicit or something like that)?
>
>  It doesn't work now, but I think a global:
>
>  [user]
>         name
>
>  Could usefully be made to disable the default.
>

Yes, in fact I tried it. I think it makes sense as a way to disable
the default name, instead of another config option.

Santi

```
