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

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

 



On Mon, Jun 11, 2012 at 08:34:55AM -0700, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > 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@xxxxxxxxxxx/foo.git"; would be
> identical to the latter one with user=peff already filled in?

Exactly. Though see my other response to Matthieu, which notes that:

  git credential fill https://peff:supersecret@xxxxxxxxxxx/foo.git

is problematic. :(

Probably it should be spelled:

  git credential fill <<\EOF
  url=https://peff:supersecret@xxxxxxxxxxx/foo.git
  EOF

and then:

  git credential fill <<\EOF
  url=https://peff:supersecret@xxxxxxxxxxx/foo.git
  username=junio
  password=othersecret

would do what you expect (break the URL out into its components, and
then override particular fields).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]