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

Antw: [EXT] Re: Improving git's password prompt

From
UWUlrich Windl <ulrich.windl@rz.uni-regensburg.de>
Date
May 12, 2020, 05:42 UTC
Message-ID
<5EBA3763020000A100038EED@gwsmtp.uni-regensburg.de>
In-Reply-To
<14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff.net>
>>> Jeff King <peff@peff.net> schrieb am 11.05.2020 um 17:34 in Nachricht

<14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff. et>:

Show 40 quoted lines
> On Mon, May 11, 2020 at 04:39:43PM +0200, Ulrich Windl wrote:
> 
>> I'm aware that most repositories use "open HTTP" or SSH public key
>> authentication, but for the few cases where SSH with password is being
>> used, there is a minor probem like this:
>> ---
>> tester@host:~/iredir> git fetch
>> Password:
>> ---
>> 
>> Now if you are working busily with the project you probably know where
>> the repository came from, what the username and password is, but if
>> you haven't worked with the repository for a while, it might be
>> helpful to see the username and host (the part up to ':' in the
>> display of "git remote -v", e.g.: "windl@server") with the password
>> prompt to select the correct password.
>> 
>> So my proposal would be "Password for user@host:" instead of just
>> "Password:".
>> 
>> Problem seen in git 2.26.1...
> 
> That prompt is generated by ssh, not by git. Any git prompts do say
> "Password for user@host" or similar (e.g., what you see for http
> authentication).
> 
> The best we can do is print "Connecting via ssh to host..." or similar
> before running ssh, which would give more context to the "Password"
> prompt. But would probably be annoying for people using key
> authentication (and we can't know which, because that decision is made
> internally by ssh).
> 
> There might be a way to convince ssh to give a more descriptive prompt,
> but it looks like it may depend on the auth system used by the server.
> Some quick googling turns up:
> 
>   
> https://serverfault.com/questions/849906/how-to-display-userhostname-in-sshd- 
> password-prompt
> 
Hi Jeff,
thanks for explaining that! I'm sorry thinking the prompt was from Git.

Regards, Ulrich

Previous: Jeff King
Message 3 of 3 in “Improving git's password prompt”
  1. Ulrich WindlMay 11, 2020
  2. Jeff KingMay 11, 2020
  3. Antw: [EXT] Re: Improving git's password promptUlrich Windl, May 12, 2020

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.