From: Jeff King <peff@peff.net>
To: Martin-Louis Bright <mlbright@gmail.com>
Cc: lars.schneider@autodesk.com, git@vger.kernel.org,
sandals@crustytoothpaste.net, Johannes.Schindelin@gmx.de,
pstodulk@redhat.com, nickh@reactrix.com,
jeremy.wyman@microsoft.com,
Lars Schneider <larsxschneider@gmail.com>
Subject: Re: [RFC PATCH v1] http: add http.keepRejectedCredentials config
Date: Mon, 4 Jun 2018 14:55:51 -0400 [thread overview]
Message-ID: <20180604185551.GA4296@sigill.intra.peff.net> (raw)
In-Reply-To: <CAG2PGsoHajiYbS29F2nD+_0i2b4+Min5NR3tQYDb3MH=BW=0Aw@mail.gmail.com>
On Mon, Jun 04, 2018 at 12:18:59PM -0400, Martin-Louis Bright wrote:
> Why must the credentials must be deleted after receiving the 401 (or
> any) error? What's the rationale for this?
Because Git only tries a single credential per invocation. So if a
helper provides one, it doesn't prompt. If you get a 401 and then the
program aborts, invoking it again is just going to try the same
credential over and over. Dropping the credential from the helper breaks
out of that loop.
In fact, this patch probably should give the user some advice in that
regard (either in the documentation, or as a warning when we skip the
rejection). If you _do_ have a bogus credential and set the new option,
you'd need to reject it manually (you can do it with "git credential
reject", but it's probably easier to just unset the option temporarily
and re-invoke the original command).
-Peff
next prev parent reply other threads:[~2018-06-04 18:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 12:26 [RFC PATCH v1] http: add http.keepRejectedCredentials config lars.schneider
2018-06-04 14:47 ` Jeff King
2018-06-04 16:18 ` Martin-Louis Bright
2018-06-04 18:55 ` Jeff King [this message]
2018-06-08 3:15 ` Lars Schneider
2018-06-08 5:47 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180604185551.GA4296@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jeremy.wyman@microsoft.com \
--cc=lars.schneider@autodesk.com \
--cc=larsxschneider@gmail.com \
--cc=mlbright@gmail.com \
--cc=nickh@reactrix.com \
--cc=pstodulk@redhat.com \
--cc=sandals@crustytoothpaste.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).