Git Windows禁用密码提示UI但从shell获取密码提示

Yog*_*h_D 23 git git-bash

在git bash for windows中,用户名和/或密码在单独的UI弹出提示中询问,如下所示.

用户名提示

在点击取消时,您将获得以下基于shell的提示,其中可以输入相同的用户名.

基于Shell的用户名提示

有没有办法可以禁用这些提示?我仍然想输入我的用户名和密码,但不是基于UI的提示,我想通过基于shell的提示输入它.

使用此建议无济于事.如何撤消git config --system core.askpass git-gui - askpass

hin*_*nks 31

尝试core.askPass全局清空变量(在配置文件中)

$ git config --global core.askPass ""
Run Code Online (Sandbox Code Playgroud)

或者使用-c开关仅为一个命令覆盖它

$ git -c core.askPass="" clone <https_url>
Run Code Online (Sandbox Code Playgroud)

请参阅:https://git-scm.com/docs/gitcredentials

注意:core.askPass通过使用取消设置git config --global --unset core.askPass没有帮助.它需要设置为如上所述的空字符串.