https://bz.mercurial-scm.org/show_bug.cgi?id=5455
Bug ID: 5455 Summary: ssh doesn't prompt for key passphrase on terminal when using chg Product: Mercurial Version: 4.0 Hardware: All OS: Linux Status: UNCONFIRMED Severity: feature Priority: wish Component: chg Assignee: bugzi...@mercurial-scm.org Reporter: gregory.sz...@gmail.com CC: arcppzju+hg...@gmail.com, mercurial-de...@selenic.com $ ./hg push -f user --debug pushing to ssh://hg.mozilla.org/users/gszorc_mozilla.com/hg running ssh hg.mozilla.org 'hg -R users/gszorc_mozilla.com/hg serve --stdio' sending hello command sending between command Enter passphrase for key '<redacted>': That works! But when using chg: $ chg push -f user --debug pushing to ssh://hg.mozilla.org/users/gszorc_mozilla.com/hg running ssh hg.mozilla.org 'hg -R users/gszorc_mozilla.com/hg serve --stdio' sending hello command sending between command remote: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory remote: Permission denied (publickey). abort: no suitable response from remote hg! This is on Ubuntu 16.10. Installing an ssh-askpass package fixes things. But it launches some graphical widget to enter my password. I want the default, terminal based prompt to "just work." From the ssh man page: SSH_ASKPASS If ssh needs a passphrase, it will read the passphrase from the current terminal if it was run from a terminal. 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. This is particularly useful when calling ssh from a .xsession or related script. (Note that on some machines it may be necessary to redirect the input from /dev/null to make this work.) I haven't looked at the openssh source code, but I suspect stdin not being a TTY is changing the behavior of OpenSSH. I wonder if there is a way we can force openssh to read from stdin. If not, a hacky workaround would be to provide our own SSH_ASKPASS implementation that reads from stdin. Yuck. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel