The problem is that, regardless of the terminal used (puttycyg, mintty, cmd.exe), Git by default, in the absence of better configured alternatives, tries to use a "simple password prompt" (as you can read in the description of core.askpassconfig option).
The simple password prompt apparently only works on real UNIX, but not on Cygwin.
The solution is to install an SSH_ASKPASS compatible program for Windows and configure Git to use it.
What I did was:
Install win-ssh-askpass application by unpacking and copying to C:\
Configure Git to obtain passwords using win-ssh-askpass: git config --global core.askpass "C:/win_ssh_askpass.exe". Note that the EXE file has underscores in its name, not minus signs.
Remember to always place your login in the URL (https://<user>@<domain>/<repository>). Otherwise, Git will ask for the login before asking for the password, using the same askpass utility. You may unknowingly input your password as the login, which will be sent to the webserwer and logged in its access log as plain text!
Now Git asks for the password using an elegant GUI window and works regardless of the terminal used :)
Unless you're using cygwin as a multiuser environment (in which case use chsh as you would under a standard environment.)
Otherwise, you just change cygwin.bat to run zsh -l -i instead of bash --login -i and it will run as a login shell.
Of course, if you want to run multiple shells from startup, just create a set of .bat files to load different shells. (sh, ksh, csh, fish etc)
Update...
I felt I should update this to provide info on doing this without chsh but still doing it on the Unix end. Edit the /etc/passwd file and replace occurrences of /bin/bash with /bin/zsh. (This is effectively what chsh would do, but this way you'd do it for all users in one go.)
Best Answer
Just edit your
/etc/passwd
and replace/bin/bash
with/bin/zsh
.