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

Re: Clear an invalid password out of the credential-cache?

From
Jeff King <peff@peff.net>
Date
Apr 14, 2014, 22:15 UTC
Message-ID
<20140414221530.GA29704@sigill.intra.peff.net>
In-Reply-To
<2D1883E9414E4E1E99559A6A2163BE87@black>
On Sat, Apr 12, 2014 at 09:12:57AM -0400, Jason Pyeron wrote:
> Is it me or is the only way to clear a single invalid password out of the
> credential-cache is by "git credential-cache exit"?
Try the "reject" action:
  $ : remember a credential
  $ url() { echo url=https://example.com; }
  $ (url; echo username=me; echo password=foo) | git credential-cache store
  $ : get it again
  $ url | git credential-cache get
  username=me
  password=foo
  $ : forget it
  $ url | git credential-cache erase
  $ : now produces nothing
  $ url | git credential-cache get

Git should do this for you automatically if it tries to use the password and gets rejected (but only if the rejection is a password rejection, like an HTTP 401).

-Peff
Previous: Jason Pyeron
Message 2 of 2 in “Clear an invalid password out of the credential-cache?”
  1. Jason PyeronApr 12, 2014
  2. Jeff KingApr 14, 2014

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.