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

Re: [PATCH_v1] add 'git credential' plumbing command

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2012, 15:34 UTC
Message-ID
<7vlijt980w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120610115619.GA6453@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> Perhaps it would be simpler to accept a URL on the command line, and
> also provide a --stdin option for callers that want to feed it directly.
> So:
>
>   git credential fill https://example.com/foo.git
>
> would be identical to:
>
>   git credential --stdin fill <<\EOF
>   protocol=https
>   host=example.com
>   path=foo.git
>   EOF

and "git credential fill https://peff@example.com/foo.git" would be identical to the latter one with user=peff already filled in?

Show 24 quoted lines
> I am tempted to suggest that this actually output the _whole_
> credential, not just the username and password. Coupled with the above
> behavior, you would get:
>
>   $ git credential fill https://example.com/foo.git
>   protocol=https
>   host=example.com
>   path=foo.git
>   username=bob
>   password=secr3t
>
> which happens to be exactly what you want to feed back to the "approve"
> and "reject" actions (and it is not really any harder to parse).
>
> We _could_ get by with allowing:
>
>   git credential --stdin approve https://example.com/foo.git <<\EOF
>   username=bob
>   password=secr3t
>   EOF
>
> and having it combine the URL on the command-line with the entries on
> stdin (and indeed, I think that is the only sane thing to do when
> --stdin and a URL are both given).
All good suggestions ;-).
Previous: Jeff KingNext: Jeff King
Message 11 of 15 in “[PATCH_v1] add 'git credential' plumbing command”
  1. javier.roucher-iglesias@ensimag.imag.frJun 9, 2012
  2. konglu@minatec.inpg.frJun 9, 2012
  3. roucherjJun 10, 2012
  4. Matthieu MoyJun 10, 2012
  5. Junio C HamanoJun 10, 2012
  6. Matthieu MoyJun 10, 2012
  7. Jonathan NiederJun 10, 2012
  8. Jonathan NiederJun 10, 2012
  9. Junio C HamanoJun 11, 2012
  10. Jeff KingJun 10, 2012
  11. Junio C HamanoJun 11, 2012
  12. Jeff KingJun 11, 2012
  13. Matthieu MoyJun 11, 2012
  14. Jeff KingJun 11, 2012
  15. Matthieu MoyJun 10, 2012

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.