From: Jeff King <peff@peff.net>
To: Mikko Rapeli <mikko.rapeli@iki.fi>
Cc: git@vger.kernel.org, Shawn Pearce <spearce@spearce.org>
Subject: Re: git https transport and wrong password
Date: Tue, 2 Apr 2013 16:05:51 -0400 [thread overview]
Message-ID: <20130402200551.GA535@sigill.intra.peff.net> (raw)
In-Reply-To: <20130402194751.GV30514@lakka.kapsi.fi>
On Tue, Apr 02, 2013 at 10:47:51PM +0300, Mikko Rapeli wrote:
> Don't know anything about curl but maybe git could parse the url for a
> username and prompt for the password before the first 401 failure roundtrip
> that's now in place. I guess most of this logic is in http.c.
We used to do that but stopped, as curl might also be able to retrieve
the password from .netrc; the extra prompt was an annoyance to users
in this situation.
Now that we have the credential subsystem, I would recommend dropping
usernames from all git-over-http URLs, and either:
1. Using a credential helper that supports secure long-term storage
(osxkeychain, wincred, etc).
2. Specifying the username to the credential subsystem explicitly, by
putting something like:
[credential "https://yourhost/"]
username = yourusername
in your git config.
Obviously (1) is nicer, but you may have corporate policies against
storing credentials. Or you may have a complicated single sign-on
procedure, where the password changes. In that case, I would still say
it is worth writing a custom helper script that can feed the temporary
credential to git.
-Peff
next prev parent reply other threads:[~2013-04-02 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 15:54 git https transport and wrong password Mikko Rapeli
2013-04-02 16:23 ` Mikko Rapeli
2013-04-02 19:28 ` Jeff King
2013-04-02 19:47 ` Mikko Rapeli
2013-04-02 20:05 ` Jeff King [this message]
2013-04-02 20:20 ` Mikko Rapeli
2013-04-03 9:43 ` Mikko Rapeli
2013-04-03 14:12 ` Jeff King
2013-04-03 16:15 ` Mikko Rapeli
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=20130402200551.GA535@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=mikko.rapeli@iki.fi \
--cc=spearce@spearce.org \
/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).