In git bash for windows, the username and/or password is asked in a separate UI popup prompt like below.
On Hitting Cancel you get the below shell based prompt
Unset SSH_ASKPASS
.
unset SSH_ASKPASS
To do this automatically each time you open git bash, you can add the above line to the end of your .bashrc
.
The gitcredentials docs linked in other answers list a number of places git will check to determine how to ask for a password. I investigated each in turn:
env | grep GIT
git config --get core.askPass
env | grep SSH
The last command told me SSH_ASKPASS
existed:
SSH_ASKPASS=/mingw64/libexec/git-core/git-gui--askpass`.
This is not part of my dotfiles, and so seems to come from the default Windows git distribution from http://git-scm.com.