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
In my case I've been using git 1.9.5 for 3 years. And recently I tried to install latest version 2.15.0. In the latest git bash when I do git pull it was asking me to enter password whereas in old git version(1.9.5) it won't ask anything like that.
I did search in google. Finally my friend helped me to resolve that. It is because I've configured dsa key instead of rsa key. As per my understanding dsa is old key format and rsa is new key format.
To use the latest git bash with old dsa key I did the below thing, create a file named "config"(It is the full name) inside your .ssh folder. In that file give the below note,
PubkeyAcceptedKeyTypes=+ssh-dss
And save it.
Now open the latest git bash. And do git pull. It won't ask any password and just pull the commits.