Git-credential-manager-for-windows: Credentials aren't saved when prompted from vs code

Created on 4 May 2017  路  5Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

For the longest time now when VS Code would open I'd be prompted to log in to GitHub. I've never used the built-in git functionality so I've always just canceled out of the prompt and continued on. There have been times where I'd try to log in but the next time I'd open VS Code I'd be prompted to log in again.

Today this came to a head when 1.12 of VS Code installed because every 60 seconds or so I'd be prompted and no matter how many times I'd log in or cancel the prompt would show right back up. Looking in the Windows Credential Manager showed nothing for github.com even though I tried a dozen+ times and all the previous times.

I finally tried cloning a repo from the command line (Win+R > cmd instead of opening it from GitHub Desktop like I normally would) and was prompted to log in. Once I logged in the credentials showed in the Windows Credential Manager and I'm no longer prompted on the command line or in VS Code.

as-designed-or-wont-fix bug user-experience

All 5 comments

VSCode actually uses whatever version of Git you have installed locally and it feels like this is #399 which was fixed a couple of releases ago - so it should just need an update.

Which version of Git do you have installed? You might have multiple, and so VSCode's rules will come into play here.

When VS Code updated I was on 2.11.1 of Git, then I updated to 2.12.2. When I check the Git version from the command prompt & the VC Code integrated terminal I get the same version.

I just cleared the GitHub credentials from the Windows Credential Manager and tried the process again.

Opening VS Code prompts me to login so I entered my information. Refreshing the WCM doesn't show an entry for GitHub. I'm then prompted to log in every 60 seconds or so regardless of if I try to sign in or hit cancel. I then went to the command prompt and did a git pull origin on a repo which prompted me to log in. This time the credentials were saved to the WCM and opening VS Code again no longer prompts me.

@xt0rted maybe this is something is introduced in VSCode 1.12 - I'd recommend putting it in front of the team to confirm they're not doing anything different with credentials when invoking Git.

Looks like GfW v2.12.2 shipped with GVM v1.9.0 and v1.9.1 contained a fix for credentials not being persisted for some users. @xt0rted any chance you could download and run the v1.9.1 or v1.10.0.preview.2 installer and see if your issue gets sorted?

Thanks!

As mentioned in the VSCode issue the non-persisted credentials issue is resolved with 1.9.1. I'm still getting prompted every minute or so if I select Cancel but since that started when VSCode 1.12 installed I think that's an issue with Code and not GCM.

Was this page helpful?
0 / 5 - 0 ratings