{"thread":{"id":"36400","subject":"Clear an invalid password out of the credential-cache?","startedAt":"2014-04-12T13:12:57Z","lastAt":"2014-04-14T22:15:30Z","messageCount":2,"participants":["Jason Pyeron","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"238772","messageId":"2D1883E9414E4E1E99559A6A2163BE87@black","threadId":"36400","inReplyTo":null,"subject":"Clear an invalid password out of the credential-cache?","fromName":"Jason Pyeron","fromEmail":"jpyeron@pdinc.us","sentAt":"2014-04-12T13:12:57Z","receivedAt":"2014-04-12T13:12:57Z","isPatch":false,"sender":{"key":"jpyeron@pdinc.us","avatar":"https://gravatar.com/avatar/c2e53452caa53d940768a1ffc9cf76196d851b9b534b7a39cd39852a70a0508f?d=mp&s=160"},"body":"Is it me or is the only way to clear a single invalid password out of the\ncredential-cache is by \"git credential-cache exit\"?\n\n-Jason\n\n--\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-                                                               -\n- Jason Pyeron                      PD Inc. http://www.pdinc.us -\n- Principal Consultant              10 West 24th Street #100    -\n- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -\n-                                                               -\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nThis message is copyright PD Inc, subject to license 20080407P00.\n"},{"id":"238871","messageId":"20140414221530.GA29704@sigill.intra.peff.net","threadId":"36400","inReplyTo":"2D1883E9414E4E1E99559A6A2163BE87@black","subject":"Re: Clear an invalid password out of the credential-cache?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-04-14T22:15:30Z","receivedAt":"2014-04-14T22:15:30Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Apr 12, 2014 at 09:12:57AM -0400, Jason Pyeron wrote:\n\n> Is it me or is the only way to clear a single invalid password out of the\n> credential-cache is by \"git credential-cache exit\"?\n\nTry the \"reject\" action:\n\n  $ : remember a credential\n  $ url() { echo url=https://example.com; }\n  $ (url; echo username=me; echo password=foo) | git credential-cache store\n\n  $ : get it again\n  $ url | git credential-cache get\n  username=me\n  password=foo\n\n  $ : forget it\n  $ url | git credential-cache erase\n\n  $ : now produces nothing\n  $ url | git credential-cache get\n\nGit should do this for you automatically if it tries to use the password\nand gets rejected (but only if the rejection is a password rejection,\nlike an HTTP 401).\n\n-Peff\n"}]}