git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Javier.Roucher-Iglesias@ensimag.imag.fr, git@vger.kernel.org,
	Javier Roucher <jroucher@gmail.com>,
	Pavel Volek <Pavel.Volek@ensimag.imag.fr>,
	NGUYEN Kim Thuat <Kim-Thuat.Nguyen@ensimag.imag.fr>,
	ROUCHER IGLESIAS Javier <roucherj@ensimag.imag.fr>,
	Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: Re: [PATCH_v1] add 'git credential' plumbing command
Date: Mon, 11 Jun 2012 11:45:18 -0400	[thread overview]
Message-ID: <20120611154518.GA12773@sigill.intra.peff.net> (raw)
In-Reply-To: <7vlijt980w.fsf@alter.siamese.dyndns.org>

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

> Jeff King <peff@peff.net> 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@example.com/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@example.com/foo.git

is problematic. :(

Probably it should be spelled:

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

and then:

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

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

-Peff

  reply	other threads:[~2012-06-11 15:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-09 18:45 [PATCH_v1] add 'git credential' plumbing command Javier.Roucher-Iglesias
2012-06-09 19:52 ` konglu
2012-06-10 17:41   ` roucherj
2012-06-10 18:12     ` Matthieu Moy
2012-06-10  6:53 ` Junio C Hamano
2012-06-10 13:16   ` Matthieu Moy
2012-06-10 20:32     ` Jonathan Nieder
2012-06-10 21:02       ` Jonathan Nieder
2012-06-11 15:35         ` Junio C Hamano
2012-06-10 11:56 ` Jeff King
2012-06-11 15:34   ` Junio C Hamano
2012-06-11 15:45     ` Jeff King [this message]
2012-06-11 18:02   ` Matthieu Moy
2012-06-11 18:18     ` Jeff King
2012-06-10 13:18 ` Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120611154518.GA12773@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Javier.Roucher-Iglesias@ensimag.imag.fr \
    --cc=Kim-Thuat.Nguyen@ensimag.imag.fr \
    --cc=Matthieu.Moy@imag.fr \
    --cc=Pavel.Volek@ensimag.imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jroucher@gmail.com \
    --cc=roucherj@ensimag.imag.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).