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

Re: credentials are being erased from credential manager via git credential-wincred erase command

From
Bryan Turner <bturner@atlassian.com>
Date
Apr 13, 2016, 19:12 UTC
Message-ID
<CAGyf7-FJcJyP_CdRZLO7Eh6DoWp8XRU2CNczCdaYJO_MS6rnmw@mail.gmail.com>
In-Reply-To
<58eced84663c4ef38a63811d3367acf2@USNAEXCP1.pc.cognex.com>
Ken,

I'm one of the developers for Atlassian Bitbucket Server (formerly Stash), which I believe you're running.

>From the credentials code in Git (which I could be mis-reading; I'm

sure others on the list will correct me if I'm wrong), it appears the erase is done after a cached credential is rejected by the server. That implies that, periodically, authentication with your Stash server is failing and that that failed authentication results in Git clearing the "bad" credential. That's likely why you see this happen on seemingly random builds.

To follow up on the possibility that authentication with Stash is periodically failing, I'd recommend opening a support request at support.atlassian.com. My belief is that the remote Git client is doing what it's intended to do in response to an authentication failure. That suggests we need to look at your Stash instance to determine why authentication is failing. If you do open a support request, please mention me in your description so that our support engineers can attach me to the issue!

Best regards, Bryan Turner

On Wed, Apr 13, 2016 at 12:49 PM, O'Connell, Ken <Ken.O'Connell@cognex.com> wrote:

Show 30 quoted lines
> Good afternoon,
>
> My company setup wincred for management of our git/stash user credentials for our automated build scripts. It works great for days, sometimes a couple weeks.
> Then one day build haven't run and we discover the scripts are randomly found at a user prompt awaiting stash user credentials.
>
> We look at Windows Credential Manager store in Windows and find the Stash user credentials are erased from Credential Manager!
>
> We discovered via GIT_TRACE, that the command used to retrieve the credentials, is being followed up by a git command to erase the credentials. -not all the time, but seemingly in a random way.
> Looking at the trace logs on one server, we see the following commands:
> 'git-remote-https' 'origin' https://stash-server/bla/bla/bla.git
> 'git-credential-wincred' 'get'
> 'git credential-wincred erase'
>
> Do you have ideas on how to track down the root cause of why this command is running?
>
> Info:
> Windows 7 machines
> Git version 1.9.5-msysgit, and Git 2.7.4 windows (on one machine to see if upgrading helped) -it did not.
> Stash version 3.11.2
>
> Please let me know if I can get any more information to help diagnose.
> Thanks,
> -Ken
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: O'Connell, KenNext: Jeff King
Message 2 of 3 in “credentials are being erased from credential manager via git credential-wincred erase command”
  1. O'Connell, KenApr 13, 2016
  2. Bryan TurnerApr 13, 2016
  3. Jeff KingApr 13, 2016

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.