git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: http getpass function in msysgit

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2010, 05:32 UTC
Message-ID
<7vpr4mrijt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1976ea661002021918m19d9b37fx1872557d3c810e3a@mail.gmail.com>
Frank Li <lznuaa@gmail.com> writes:
Show 15 quoted lines
>         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?
Previous: Frank LiNext: Frank Li
Message 2 of 6 in “http getpass function in msysgit”
  1. Frank LiFeb 3, 2010
  2. Junio C HamanoFeb 3, 2010
  3. Frank LiFeb 3, 2010
  4. Junio C HamanoFeb 4, 2010
  5. Frank LiFeb 4, 2010
  6. Junio C HamanoFeb 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.