Re: [RFE] Please add name and email to git credentials

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 1, 2018 at 2:31 PM Nicolas Mailhot
<nicolas.mailhot@xxxxxxxxxxx> wrote:
>
> Le jeudi 01 novembre 2018 à 12:22 +0100, Ævar Arnfjörð Bjarmason a
> écrit :
> >
> > Where would we get an E-Mail to lookup to pass to the helper? Are you
> > just asking that the helper git the result of $(git config user.name
> > &&
> > git config user.email)? If so why can't it just look this up itself?
>
> So, just in case it was not clear enough, allow things in .gitconfig
> like
>
> [credential "https://pkgs.fedoraproject.org/";]
> username = doe4ever
> name = John Doe
> email = doe4ever@xxxxxxxxxxxxxxxxx
> [credential "https://gitlab.corp.com/";]
> username = jdoe56874
> name = John Doe, Snr Engineer
> email = john.doe@xxxxxxxx
>
> Instead of just
>
> [user]
> name = John Doe
> email =  john.doe@xxxxxxxx
> [credential "https://pkgs.fedoraproject.org/";]
> username = doe4ever
> [credential "https://gitlab.corp.com/";]
> username = jdoe56874
>
> and drat, I've commited to XXX with the wrong name/email again

How can Git know when you commit where you will want to push the
commit afterwards?

What if you want to push the same commit to 2 different places that
need different credentials?




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux