{"thread":{"id":"17074","subject":"SSH_ASKPASS","startedAt":"2009-01-10T10:55:34Z","lastAt":"2009-01-10T18:02:12Z","messageCount":3,"participants":["Henk","Changsheng Jiang","Alexander Gavrilov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"99869","messageId":"1231584934701-2137400.post@n2.nabble.com","threadId":"17074","inReplyTo":null,"subject":"SSH_ASKPASS","fromName":"Henk","fromEmail":"henk_westhuis@hotmail.com","sentAt":"2009-01-10T10:55:34Z","receivedAt":"2009-01-10T10:55:34Z","isPatch":false,"sender":{"key":"henk_westhuis@hotmail.com","avatar":"https://gravatar.com/avatar/cf9209436cd6db77dded64c77d6afd7a26f776d73b582ef4b3e53df0befae86b?d=mp&s=160"},"body":"\nHi,\n\nI'm trying to get \"git push\" to use git-gui--askpass to ask me for the\npassword instead of promting me on the command promt. I need this because I\nstart the \"git push\" command from code and there is no terminal where ssh\ncan ask the user for a password. I tried writing the following tcl script\nthat allmost is what I need:\n\nset env(SSH_ASKPASS) \"C:/Program\nFiles/Git/libexec/git-core/git-gui--askpass\"\nexec ssh git@github.com\n\nSsh will now ask me for the password using git-gui--askpass. But now the\nstandardout is also shown in a dialog, and not on the standardout of the\nprocess. Looking at the git-gui scripts didn't help me, because I have\nabsolutely zero experience in tcl.\n\nI also tried not using a tcl script, but setting SSH_ASKPASS as an\nenvironment variable in windows. This doesn't seem to work, ssh will still\nprompt me for a password. \n\nAnyone can help me write a script that asks for the password using\nSSH_ASKPASS but still prints the output on standardout? \n\nI use Windows btw.\n\nHenk\n-- \nView this message in context: http://n2.nabble.com/SSH_ASKPASS-tp2137400p2137400.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"99909","messageId":"eafc0afe0901100913w6a461605qf48d7eb7169d50f4@mail.gmail.com","threadId":"17074","inReplyTo":"1231584934701-2137400.post@n2.nabble.com","subject":"Re: SSH_ASKPASS","fromName":"Changsheng Jiang","fromEmail":"jiangzuoyan@gmail.com","sentAt":"2009-01-10T17:13:26Z","receivedAt":"2009-01-10T17:13:26Z","isPatch":false,"sender":{"key":"jiangzuoyan@gmail.com","avatar":"https://gravatar.com/avatar/61eb7704963065c5937698bacbc1412b6083e1d43f2cc9642999fe10b2e582f8?d=mp&s=160"},"body":"Why you don't setup a pair of keys, then you will not need to enter\npasswords?\n\nYours Sincerely,\nChangsheng Jiang\n\nOn Sat, Jan 10, 2009 at 18:55, Henk <henk_westhuis@hotmail.com> wrote:\n>\n> Hi,\n>\n> I'm trying to get \"git push\" to use git-gui--askpass to ask me for the\n> password instead of promting me on the command promt. I need this because I\n> start the \"git push\" command from code and there is no terminal where ssh\n> can ask the user for a password. I tried writing the following tcl script\n> that allmost is what I need:\n>\n> set env(SSH_ASKPASS) \"C:/Program\n> Files/Git/libexec/git-core/git-gui--askpass\"\n> exec ssh git@github.com\n>\n> Ssh will now ask me for the password using git-gui--askpass. But now the\n> standardout is also shown in a dialog, and not on the standardout of the\n> process. Looking at the git-gui scripts didn't help me, because I have\n> absolutely zero experience in tcl.\n>\n> I also tried not using a tcl script, but setting SSH_ASKPASS as an\n> environment variable in windows. This doesn't seem to work, ssh will still\n> prompt me for a password.\n>\n> Anyone can help me write a script that asks for the password using\n> SSH_ASKPASS but still prints the output on standardout?\n>\n> I use Windows btw.\n>\n> Henk\n> --\n> View this message in context: http://n2.nabble.com/SSH_ASKPASS-tp2137400p2137400.html\n> Sent from the git mailing list archive at Nabble.com.\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"99914","messageId":"200901102102.12821.angavrilov@gmail.com","threadId":"17074","inReplyTo":"1231584934701-2137400.post@n2.nabble.com","subject":"Re: SSH_ASKPASS","fromName":"Alexander Gavrilov","fromEmail":"angavrilov@gmail.com","sentAt":"2009-01-10T18:02:12Z","receivedAt":"2009-01-10T18:02:12Z","isPatch":false,"sender":{"key":"angavrilov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42666?v=4"},"body":"On Saturday 10 January 2009 13:55:34 Henk wrote:\n> I'm trying to get \"git push\" to use git-gui--askpass to ask me for the\n> password instead of promting me on the command promt. I need this because I\n> start the \"git push\" command from code and there is no terminal where ssh\n> can ask the user for a password. I tried writing the following tcl script\n> that allmost is what I need:\n> \n> set env(SSH_ASKPASS) \"C:/Program\n> Files/Git/libexec/git-core/git-gui--askpass\"\n> exec ssh git@github.com\n> \n> Ssh will now ask me for the password using git-gui--askpass. But now the\n> standardout is also shown in a dialog, and not on the standardout of the\n> process. Looking at the git-gui scripts didn't help me, because I have\n> absolutely zero experience in tcl.\n> \n> I also tried not using a tcl script, but setting SSH_ASKPASS as an\n> environment variable in windows. This doesn't seem to work, ssh will still\n> prompt me for a password. \n> \n> Anyone can help me write a script that asks for the password using\n> SSH_ASKPASS but still prints the output on standardout? \n\nOpenSSH won't even try to use SSH_ASKPASS if it has access to a terminal.\nTcl makes it work precisely because the Tcl interpreter is a GUI application\nthat is detached from the console.\n\nYou should set the SSH_ASKPASS variable, and try running the commands as\nyou actually plan to do it from your code.\n\nAlexander\n"}]}