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

Re: [RFC PATCH v1] http: add http.keepRejectedCredentials config

From
Jeff King <peff@peff.net>
Date
Jun 8, 2018, 05:47 UTC
Message-ID
<20180608054745.GA2893@sigill.intra.peff.net>
In-Reply-To
<46F82119-D185-4B41-828B-FC92709CFCDA@gmail.com>
On Thu, Jun 07, 2018 at 08:15:16PM -0700, Lars Schneider wrote:
Show 19 quoted lines
> > 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).
> 
> I like the advice idea very much!
> 
> How about this?
> 
> $ git fetch
> hint: Git has stored invalid credentials.
> hint: Reject them with 'git credential reject' or
> hint: disable the Git config 'http.keepRejectedCredentials'.
> remote: Invalid username or password.
> fatal: Authentication failed for 'https://server.com/myrepo.git/'
> 
> I am not really sure about the grammar :-)

It's probably not worth pointing the user at "git credential reject", since it's not really meant to be friendly to users. In particular, you have to speak the credential protocol on stdin.

I _think_
  echo https://server.com/myrepo.git | git credential reject

might be enough, but I didn't test. Probably better advice is to just repeat the command. Maybe:

  hint: Git kept invalid credentials due to the value of
  hint: http.keepRejectedCredentials. If you wish to drop these
  hint: credentials and be prompted for new ones, re-run your
  hint: command with "git -c http.keepRejectedCredentials=false".
or something?
-Peff
Previous: Lars Schneider
Message 6 of 6 in “http: add http.keepRejectedCredentials config”
  1. http: add http.keepRejectedCredentials configlars.schneider@autodesk.com, Jun 4, 2018
  2. Jeff KingJun 4, 2018
  3. Martin-Louis BrightJun 4, 2018
  4. Jeff KingJun 4, 2018
  5. Lars SchneiderJun 8, 2018
  6. Jeff KingJun 8, 2018

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.