@Screwtape (at least partially) fixed in his answer . If you look at this page , it shows the same problem (against the background of a larger problem), but also indicates how to get around this error.
While you are using SSH on the computer where you want to run the git command, try:
$ unset SSH_ASKPASS
This disables the environment variable $ SSH_ASKPASS. If you then run the git command that you want to run, it should work. It works on my Windows plug-in terminal, in which I am SSH'ing on a CentOS server. Note that this uninstalled change is NOT permanent (maybe good), and you need to re-disable this option the next time you log in, but it does the job if you want to run git scripts.
Why does this error still exist despite being reported more than two years ago? From this source, it seems that Windows never sets the DISPLAY environment variable, and therefore git will not work properly if it performs this check. Thus, the functionality is abandoned (apparently), and the quote left by @Screwtape is correctly copied, but not really applied.
Florian Mertens
source share