Git Windows Disable password prompt UI but get password prompt from shell

Yogesh_D picture Yogesh_D · Dec 21, 2015 · Viewed 17.6k times · Source

In git bash for windows, the username and/or password is asked in a separate UI popup prompt like below.

Username Prompt

On Hitting Cancel you get the below shell based prompt, where the same username can be input.

Shell based username prompt

Is there a way I can disable these prompts? I still do want to enter my username and password however instead of the UI based prompt, i want to enter it through the shell based prompt.

Using suggestions from this does not help. How to undo git config --system core.askpass git-gui--askpass

Answer

hinneLinks picture hinneLinks · Dec 21, 2015

Try to blank the variable core.askPass globally (in your config-file)

$ git config --global core.askPass ""

or use the -c switch to override it just for one command

$ git -c core.askPass="" clone <https_url>

see: https://git-scm.com/docs/gitcredentials

Note: un-setting the core.askPass by using git config --global --unset core.askPass doesn't help. It needs to be set to an empty string like above.