|
Hi,
I'm trying to get "git push" to use git-gui--askpass to ask me for the password instead of promting me on the command promt. I need this because I start the "git push" command from code and there is no terminal where ssh can ask the user for a password. I tried writing the following tcl script that allmost is what I need: set env(SSH_ASKPASS) "C:/Program Files/Git/libexec/git-core/git-gui--askpass" exec ssh git@github.com Ssh will now ask me for the password using git-gui--askpass. But now the standardout is also shown in a dialog, and not on the standardout of the process. Looking at the git-gui scripts didn't help me, because I have absolutely zero experience in tcl. I also tried not using a tcl script, but setting SSH_ASKPASS as an environment variable in windows. This doesn't seem to work, ssh will still prompt me for a password. Anyone can help me write a script that asks for the password using SSH_ASKPASS but still prints the output on standardout? I use Windows btw. Henk |
|
Why you don't setup a pair of keys, then you will not need to enter
passwords? Yours Sincerely, Changsheng Jiang On Sat, Jan 10, 2009 at 18:55, Henk <[hidden email]> wrote: > > Hi, > > I'm trying to get "git push" to use git-gui--askpass to ask me for the > password instead of promting me on the command promt. I need this because I > start the "git push" command from code and there is no terminal where ssh > can ask the user for a password. I tried writing the following tcl script > that allmost is what I need: > > set env(SSH_ASKPASS) "C:/Program > Files/Git/libexec/git-core/git-gui--askpass" > exec ssh [hidden email] > > Ssh will now ask me for the password using git-gui--askpass. But now the > standardout is also shown in a dialog, and not on the standardout of the > process. Looking at the git-gui scripts didn't help me, because I have > absolutely zero experience in tcl. > > I also tried not using a tcl script, but setting SSH_ASKPASS as an > environment variable in windows. This doesn't seem to work, ssh will still > prompt me for a password. > > Anyone can help me write a script that asks for the password using > SSH_ASKPASS but still prints the output on standardout? > > I use Windows btw. > > Henk > -- > View this message in context: http://n2.nabble.com/SSH_ASKPASS-tp2137400p2137400.html > Sent from the git mailing list archive at Nabble.com. > > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to [hidden email] > More majordomo info at http://vger.kernel.org/majordomo-info.html To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
|
This post has NOT been accepted by the mailing list yet.
Hi,
I'm writing a windows ui for git (gitextensions), thats why I need this. Henk Date: Sat, 10 Jan 2009 09:13:43 -0800 From: [hidden email] To: [hidden email] Subject: Re: SSH_ASKPASS Why you don't setup a pair of keys, then you will not need to enter passwords? Yours Sincerely, Changsheng Jiang On Sat, Jan 10, 2009 at 18:55, Henk <henk_westhuis@...> wrote: > > Hi, > > I'm trying to get "git push" to use git-gui--askpass to ask me for the > password instead of promting me on the command promt. I need this because I > start the "git push" command from code and there is no terminal where ssh > can ask the user for a password. I tried writing the following tcl script > that allmost is what I need: > > set env(SSH_ASKPASS) "C:/Program > Files/Git/libexec/git-core/git-gui--askpass" > exec ssh git@... > > Ssh will now ask me for the password using git-gui--askpass. But now the > standardout is also shown in a dialog, and not on the standardout of the > process. Looking at the git-gui scripts didn't help me, because I have > absolutely zero experience in tcl. > > I also tried not using a tcl script, but setting SSH_ASKPASS as an > environment variable in windows. This doesn't seem to work, ssh will still > prompt me for a password. > > Anyone can help me write a script that asks for the password using > SSH_ASKPASS but still prints the output on standardout? > > I use Windows btw. > > Henk > -- > View this message in context: http://n2.nabble.com/SSH_ASKPASS-tp2137400p2137400.html > Sent from the git mailing list archive at Nabble.com. > > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@... > More majordomo info at http://vger.kernel.org/majordomo-info.html the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html This email is a reply to your post @ http://n2.nabble.com/SSH_ASKPASS-tp2137400p2138395.html You can reply by email or by visting the link above. Twee keer zo leuk. Deel foto's terwijl je chat met de nieuwe Messenger |
|
In reply to this post by Henk
On Saturday 10 January 2009 13:55:34 Henk wrote:
> I'm trying to get "git push" to use git-gui--askpass to ask me for the > password instead of promting me on the command promt. I need this because I > start the "git push" command from code and there is no terminal where ssh > can ask the user for a password. I tried writing the following tcl script > that allmost is what I need: > > set env(SSH_ASKPASS) "C:/Program > Files/Git/libexec/git-core/git-gui--askpass" > exec ssh [hidden email] > > Ssh will now ask me for the password using git-gui--askpass. But now the > standardout is also shown in a dialog, and not on the standardout of the > process. Looking at the git-gui scripts didn't help me, because I have > absolutely zero experience in tcl. > > I also tried not using a tcl script, but setting SSH_ASKPASS as an > environment variable in windows. This doesn't seem to work, ssh will still > prompt me for a password. > > Anyone can help me write a script that asks for the password using > SSH_ASKPASS but still prints the output on standardout? OpenSSH won't even try to use SSH_ASKPASS if it has access to a terminal. Tcl makes it work precisely because the Tcl interpreter is a GUI application that is detached from the console. You should set the SSH_ASKPASS variable, and try running the commands as you actually plan to do it from your code. Alexander -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
| Powered by Nabble | Edit this page |
