In case you do not want to remove or uninstall the credentials manager: see https://serverfault.com/questions/544156/git-clone-fail-instead-of-prompting-for-credentials/1054253#answer-1054253 for the solution that worked for me.
Explanations, etc. in that page (linked to prevent duplicate content in the same website family).
TL;DR: this now sits on top of my automated bash
scripts:
# https://serverfault.com/questions/544156/git-clone-fail-instead-of-prompting-for-credentials
export GIT_TERMINAL_PROMPT=0
# next env var doesn't help...
export GIT_SSH_COMMAND='ssh -oBatchMode=yes'
# these should shut up git asking, but only partly: the X-windows-like dialog doesn't pop up no more, but ...
export GIT_ASKPASS=echo
export SSH_ASKPASS=echo
# We needed to find *THIS* to shut up the bloody git-for-windows credential manager:
# https://stackoverflow.com/questions/37182847/how-do-i-disable-git-credential-manager-for-windows#answer-45513654
export GCM_INTERACTIVE=never
The final nail in the coffin of that credentials manager was the unique bit (GCM_INTERACTIVE
) in Martin Ba's answer above: How do I disable Git Credential Manager for Windows?