With a clean install of Visual Studio 2019 (Community Edition), every push to a GitHub repo asks for credentials. When I paste in my access token the push succeeds, but I'm asked again on the next push.
Git credential helpers are supposed to cache your credentials, and Visual Studio 2019 uses the Git Credential Manager (GCM) by default. (I see "GCM" in Git > Settings > Source Control > Git Global Settings > Credential Helper. I see credential.helper=manager
in git config --list
.)
No luck with the solutions in this question (which is about Visual Studio Code) -- same behavior if I set the credential helper to store
or cache
or wincred
or manager-core
.
Same behavior if I run from the command line:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd\git.exe" push
(This worked fine for years until I installed Visual Studio 2022, uninstalled it, and reinstalled Visual Studio 2019.)
I've spent half a day on this. Almost ready to go back to SSL (ugh).
Any ideas?
Be sure to check the git config at each level (project, global, and system) to make sure a setting is to be what you expect.
[repository]/.git/config
.~/.gitconfig
.C:\Program Files\Git\etc\gitconfig
for Windows.You should be able to check settings from the command line as well for each of the different levels.
# effective settings (if set in project, global, or system)
$ git config credential.helper
# project settings (if set)
$ git config --local credential.helper
# global settings (if set)
$ git config --global credential.helper
# system settings (if set)
$ git config --system credential.helper