Q:

How to remove git user from config?

When I try to push on Windows machine, I get the following error:
$ git push -u origin master
remote: Permission to XXX/YYY.git denied to ZZZ.
fatal: unable to access 'https://github.com/XXX/YYY.git/': The requested URL returned error: 403

The problem is, that I cannot find the "ZZZ" user mentioned anywhere in the settings. I have cleaned up the ~/.gitconfig and ~/.ssh/config, where else should I look for it?

A:

Git for Windows uses the “Git Credential Manager” to store credentials for non-SSH repositories. This has the benefit that you do not need to enter your credentials into the command line all the time. The credential manager also gives you a native login form for various external services, so it feels nicer.
Credentials are stored in Windows’s credential store which is accessible through the Credential Manager in the control panel. There, you can see what credentials are stored and individually remove them.
You can also launch the more technical “Stored User Names and Passwords” UI by running rundll32.exe keymgr.dll, KRShowKeyMgr.

