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

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

From
NMNicolas Mailhot <nicolas.mailhot@laposte.net>
Date
Nov 2, 2018, 08:57 UTC
Message-ID
<1e3901b9a75a043d9c31d66d98410f3288a7c5be.camel@laposte.net>
In-Reply-To
<CAP8UFD0DHGShwo=DnwbSHz3nvRMF9P4GegEzC27uwHLXQ=A4Zw@mail.gmail.com>
Le vendredi 02 novembre 2018 à 09:27 +0100, Christian Couder a écrit :
Show 13 quoted lines
> On Thu, Nov 1, 2018 at 3:42 PM Nicolas Mailhot
> <nicolas.mailhot@gmail.com> wrote:
> > Le jeudi 01 novembre 2018 à 15:13 +0100, Christian Couder a écrit :
> > > How can Git know when you commit where you will want to push the
> > > commit afterwards?
> > 
> > You have an url in the repo config. of course you can change it
> > between
> > the commit and the push, but that's not the general case.
> 
> If I did a `git init`, then I have no url in the repo config. Also if
> I cloned from a repo that has a different URL than the sites I have
> credentials for, then how should git use the URL in the repo config?
Then you have no need or use for git credentials. Where’s the problem? 

Will the fact that git credential users, that already have per-repo-url settings in their .gitconfig, will also be able to use this existing per-url section to control the mail and name associated with their repos, wake you at night, or something?

> You could have no user.name and user.email configured in your global
> config, and a script that configures those in the local config
> depending on remote.origin.url. 

One could use the same arguments to say git credentials is not necessary, it's a maintenance burden, everyone should just script their auth needs manually, etc.

Are you arguing for git credentails removal here?

Or are you arguing that having two separate mecanisms in git, to match config directives to repo urls, is some kind of improvement?

I didn't create or write or specify the way git credential matches repo urls. It already exists within git. If you have a problem with the matching logic git credential uses, why are you arguing with me instead of taking it up with the maintainers of this logic?

Regards,
-- 
Nicolas Mailhot
Previous: Christian CouderNext: Jeff King
Message 8 of 13 in “[RFE] Please add name and email to git credentials”
  1. Nicolas MailhotNov 1, 2018
  2. Ævar Arnfjörð BjarmasonNov 1, 2018
  3. Nicolas MailhotNov 1, 2018
  4. Ævar Arnfjörð BjarmasonNov 1, 2018
  5. Christian CouderNov 1, 2018
  6. Nicolas MailhotNov 1, 2018
  7. Christian CouderNov 2, 2018
  8. Nicolas MailhotNov 2, 2018
  9. Jeff KingNov 2, 2018
  10. Nicolas MailhotNov 2, 2018
  11. Jeff KingNov 2, 2018
  12. Randall S. BeckerNov 1, 2018
  13. Nicolas MailhotNov 1, 2018

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.