git, SSH_ASKPASS on windows

Posted by Martin Schreiber on Stack Overflow See other posts from Stack Overflow or by Martin Schreiber
Published on 2012-06-09T10:34:50Z Indexed on 2012/06/09 10:40 UTC
Read the original article Hit count: 173

Filed under:
|
|

I am writing a graphical git frontend for Linux and Windows (MSEgit) based on MSEide+MSEgui. MSEgit has an internal console window which communicates with git by pipes. On Linux it uses a PTY so SSH asks for key unlocking passwords on the PTY.
On Windows I wrote a small password entry application and set the SSH_ASKPASS environment variable accordingly.
SSH calls the password application if git is started with CreateProcess() dwCreationFlags DETACHED_PROCESS set but the password entry window will not be focused, its taskbar icon flashes instead.
SSH does not run the password application if FreeConsole() is called to be sure that there is no attached console to MSEgit and git is started without DETACHED_PROCESS but CREATE_NO_WINDOW instead.
I assume a Windows equivalent of POSIX setsid() should be called.
How can I force SSH to use SSH_ASKPASS without the DETACHED_PROCESS flag?
If this is not possible, how can I ensure that the password entry window is focused?

© Stack Overflow or respective owner

Related posts about Windows

Related posts about git