git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git calls SSH_ASKPASS even if DISPLAY is not set

From
XWXin Wang <dram.wang@gmail.com>
Date
Dec 11, 2010, 03:24 UTC
Message-ID
<AANLkTinES5dqt+JAMOrp7gAYJ4UgK9ipfEN9ag5qSCLp@mail.gmail.com>
Hi all,

I'm using git 1.7.3.2 in Fedora 14. In Fedora, SSH_ASKPASS will set to be /usr/libexec/openssh/gnome-ssh-askpass in /etc/profile.d/gnome-ssh-askpass.sh, so this environment is set by login shell, and it will still be set even when X11 is not inuse.

According to ssh's manpage: "If ssh does not have a terminal associated with it but DISPLAY and SSH_ASKPASS are set, it will execute the program specified by SSH_ASKPASS and open an X11 window to read the passphrase." But git will call SSH_ASKPASS even if there is a terminal associated with it and DISPLAY is not set, then following warning is displayed and git failed to go through.

$ git fetch
(gnome-ssh-askpass:1487): Gtk-WARNING **: cannot open display:
I think it‘s better if git could implement behavior conforming to ssh.

Thanks, Xin Wang

Next: Alexander Sulfrian
Message 1 of 8 in “git calls SSH_ASKPASS even if DISPLAY is not set”
  1. Xin WangDec 11, 2010
  2. RE: git calls SSH_ASKPASS even if DISPLAY is not setAlexander Sulfrian, Dec 12, 2010
  3. git_getpass: fix ssh-askpass behaviourAlexander Sulfrian, Dec 12, 2010
  4. Alexander SulfrianDec 12, 2010
  5. Junio C HamanoDec 13, 2010
  6. hvoigtDec 13, 2010
  7. Johannes SixtDec 13, 2010
  8. LarryMartellMay 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.