Re: http getpass function in msysgit

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: http getpass function in msysgit

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:10

Frank Li [off-list ref] writes:
        getpass at mingw.c is direct read character with function _getch().
        GUI application, such tortoisegit will halt when http need
password input because gui don't know git wait for inputing passwords.

        To resolve this problem, I have two options.
        Options 1:
                Check if terminal is exist, if exist, using old
method. Otherwise launch internal password dialog.

        Options 2:
                like openSSH,  Check if terminal is not exist and
environment HTTP_ASKPASS exist, if true, run application which
HTTP_ASKPASS point, otherwise using old ways.

       Which one do you prefer,  I can implement it.
Is "Neither, at least not yet" an accepted answer?

 - If you look at an environment, why check terminal at all?  If the
   calling application wants to specify "here is the way to ask the user
   for a password" with it, why not use it unconditionally?

 - Why is it HTTP_ASKPASS?  If other codepaths (e.g. "ssh passphrase",
   "svn password") that do not have anything to do with HTTP transfer also
   wants that feature, wouldn't it be easier for the users to specify one
   single "password dialog" helper program, that is launched by various
   parts of git, and ask "I need the HTTP password to access li.org", "I
   need to unlock the ssh key for fl@li.org", etc?

Re: http getpass function in msysgit

From: Frank Li <hidden>
Date: 2016-06-15 22:48:10

 - If you look at an environment, why check terminal at all?  If the
  calling application wants to specify "here is the way to ask the user
  for a password" with it, why not use it unconditionally?
I just worry about user set such environment accident. Learn it from  OpenSSH.
Unconditional is okay for me.
 - Why is it HTTP_ASKPASS?  If other codepaths (e.g. "ssh passphrase",
  "svn password") that do not have anything to do with HTTP transfer also
  wants that feature,
You can choose environment name you like. I choose HTTP_ASKPASS just
because getpass only used at http.c
ssl_cert_password = getpass("Certificate Password: ");

OpenSSH is separated application and use own SSH_ASKPASS to ask password ...

May GIT_ASKPASS is optional name.
 wouldn't it be easier for the users to specify one
  single "password dialog" helper program, that is launched by various
  parts of git, and ask "I need the HTTP password to access li.org", "I
  need to unlock the ssh key for fl@li.org", etc?
It is nice to use one dialog for all cases. git-svn also have the same problem.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help