12 February 2020

git on Windows: HTTP basic authentication failed

I had been playing a bit with git security: SSH authentication, GPG signing, different user accounts and the like. A little later I reverted back to HTTPS, but now my gitlab push failed with
HTTP basic authentication failed.
No matter which git config i changed, I could not get this going.
Problem is that credentials were cached in the windows credential manager.
Hard to find an interface to that program. The command you have to run to get access is

> rundll32.exe keymgr.dll, KRShowKeyMgr
This gives you a window with a list of cached credentials. I Removed the gitlab entry and lo! next time I push I get a nice popup requesting my username/password. Next push, everything works without the popup, means Windows credential manager caches the right stuff from now on.

No comments:

Post a Comment