using the git client on a headless linux server
git, linux
Solution
You can disable `gnome-ssh-askpass` in the current session by unsetting the `SSH_ASKPASS` environment variable:
unset SSH_ASKPASS
You could probably add it in your `.bashrc` or `.profile` with a conditional check whether the user logged in using SSH. Something like:
[ -n "$SSH_CONNECTION" ] && unset SSH_ASKPASS
BTW, someone else has also complained about the git's behavior of invoking the SSH_ASKPASS program blindly without determining if it is a GUI session or not. If you read the full thread, it would explain it is not possible to use `DISPLAY` environment variable to detect this. Also there is no mention of whether that patch was accepted or not.
Problem
How do I force the git-client to use the console/terminal only. When I ssh into my remote/headless linux computer and try to run: git clone https://myname@bitbucket.org/xxx/xxx.git git complains and gives me this error: (gnome-ssh-askpass:2769): Gtk-WARNING **: cannot open display: I dont want to use a graphical interface nor ssh -X. I just want to configure the git-client to use the terminal only. Im using CentOs and got the git-client with yum install git.