What were you trying to do that didn't work?
The openssh-askpass profile scripts set SSH_ASKPASS unconditionally. This does not affect ssh because it checks if DISPLAY is set before executing the program specified in that environment variable. The git http/https helper, however, is does not check if DISPLAY is set, leading to undesirable error messages from gnome-ssh-askpass.
Please provide the package NVR for which bug is seen:
- openssh-askpass-7.4p1-23.el7_9.x86_64
- openssh-askpass-8.0p1-19.el8_8.x86_64
- openssh-askpass-8.7p1-30.el9_2.x86_64
How reproducible:
Always
Steps to reproduce
- Install git and openssh-askpass.
- Log in on the text console or via SSH.
- Confirm that SSH_ASKPASS is set and try to clone a repository
$ echo $SSH_ASKPASS /usr/libexec/openssh/gnome-ssh-askpass $ git clone https://github.com/casantos/test-private.git Cloning into 'test-private'...(gnome-ssh-askpass:2127): Gtk-WARNING **: 10:02:07.596: cannot open display: error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass' Username for 'https://github.com':
Expected results
The git command should ask for the user name and password immediately.
Actual results
Cloning into 'test-private'...(gnome-ssh-askpass:2127): Gtk-WARNING **: 10:02:07.596: cannot open display: error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass' Username for 'https://github.com':