git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Improving git's password prompt
@ 2020-05-11 14:39 Ulrich Windl
  2020-05-11 15:34 ` Jeff King
       [not found] ` <14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff.net>
  0 siblings, 2 replies; 3+ messages in thread
From: Ulrich Windl @ 2020-05-11 14:39 UTC (permalink / raw)
  To: git

Hi!

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...

Regards,
Ulrich





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Improving git's password prompt
  2020-05-11 14:39 Improving git's password prompt Ulrich Windl
@ 2020-05-11 15:34 ` Jeff King
       [not found] ` <14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff.net>
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2020-05-11 15:34 UTC (permalink / raw)
  To: Ulrich Windl; +Cc: git

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

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Antw: [EXT] Re: Improving git's password prompt
       [not found] ` <14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff.net>
@ 2020-05-12  5:42   ` Ulrich Windl
  0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Windl @ 2020-05-12  5:42 UTC (permalink / raw)
  To: peff; +Cc: git

>>> 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>:
> 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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-12  5:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 14:39 Improving git's password prompt Ulrich Windl
2020-05-11 15:34 ` Jeff King
     [not found] ` <14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff.net>
2020-05-12  5:42   ` Antw: [EXT] " Ulrich Windl

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).