{"thread":{"id":"53445","subject":"Improving git's password prompt","startedAt":"2020-05-11T14:48:30Z","lastAt":"2020-05-12T05:43:05Z","messageCount":3,"participants":["Ulrich Windl","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"397550","messageId":"5EB963AF020000A100038ECE@gwsmtp.uni-regensburg.de","threadId":"53445","inReplyTo":null,"subject":"Improving git's password prompt","fromName":"Ulrich Windl","fromEmail":"ulrich.windl@rz.uni-regensburg.de","sentAt":"2020-05-11T14:39:43Z","receivedAt":"2020-05-11T14:48:30Z","isPatch":false,"sender":{"key":"ulrich.windl@rz.uni-regensburg.de","avatar":null},"body":"Hi!\n\nI'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:\n---\ntester@host:~/iredir> git fetch\nPassword:\n---\n\nNow 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.\n\nSo my proposal would be \"Password for user@host:\" instead of just \"Password:\".\n\nProblem seen in git 2.26.1...\n\nRegards,\nUlrich\n\n\n\n\n"},{"id":"397553","messageId":"20200511153416.GB1415@coredump.intra.peff.net","threadId":"53445","inReplyTo":"5EB963AF020000A100038ECE@gwsmtp.uni-regensburg.de","subject":"Re: Improving git's password prompt","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-05-11T15:34:16Z","receivedAt":"2020-05-11T15:34:18Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 11, 2020 at 04:39:43PM +0200, Ulrich Windl wrote:\n\n> I'm aware that most repositories use \"open HTTP\" or SSH public key\n> authentication, but for the few cases where SSH with password is being\n> used, there is a minor probem like this:\n> ---\n> tester@host:~/iredir> git fetch\n> Password:\n> ---\n> \n> Now if you are working busily with the project you probably know where\n> the repository came from, what the username and password is, but if\n> you haven't worked with the repository for a while, it might be\n> helpful to see the username and host (the part up to ':' in the\n> display of \"git remote -v\", e.g.: \"windl@server\") with the password\n> prompt to select the correct password.\n> \n> So my proposal would be \"Password for user@host:\" instead of just\n> \"Password:\".\n> \n> Problem seen in git 2.26.1...\n\nThat prompt is generated by ssh, not by git. Any git prompts do say\n\"Password for user@host\" or similar (e.g., what you see for http\nauthentication).\n\nThe best we can do is print \"Connecting via ssh to host...\" or similar\nbefore running ssh, which would give more context to the \"Password\"\nprompt. But would probably be annoying for people using key\nauthentication (and we can't know which, because that decision is made\ninternally by ssh).\n\nThere might be a way to convince ssh to give a more descriptive prompt,\nbut it looks like it may depend on the auth system used by the server.\nSome quick googling turns up:\n\n  https://serverfault.com/questions/849906/how-to-display-userhostname-in-sshd-password-prompt\n\n-Peff\n"},{"id":"397590","messageId":"5EBA3763020000A100038EED@gwsmtp.uni-regensburg.de","threadId":"53445","inReplyTo":"14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff.net","subject":"Antw: [EXT] Re: Improving git's password prompt","fromName":"Ulrich Windl","fromEmail":"ulrich.windl@rz.uni-regensburg.de","sentAt":"2020-05-12T05:42:59Z","receivedAt":"2020-05-12T05:43:05Z","isPatch":false,"sender":{"key":"ulrich.windl@rz.uni-regensburg.de","avatar":null},"body":">>> Jeff King <peff@peff.net> schrieb am 11.05.2020 um 17:34 in Nachricht\n<14266_1589211256_5EB97078_14266_88_1_20200511153416.GB1415@coredump.intra.peff.\net>:\n> On Mon, May 11, 2020 at 04:39:43PM +0200, Ulrich Windl wrote:\n> \n>> I'm aware that most repositories use \"open HTTP\" or SSH public key\n>> authentication, but for the few cases where SSH with password is being\n>> used, there is a minor probem like this:\n>> ---\n>> tester@host:~/iredir> git fetch\n>> Password:\n>> ---\n>> \n>> Now if you are working busily with the project you probably know where\n>> the repository came from, what the username and password is, but if\n>> you haven't worked with the repository for a while, it might be\n>> helpful to see the username and host (the part up to ':' in the\n>> display of \"git remote -v\", e.g.: \"windl@server\") with the password\n>> prompt to select the correct password.\n>> \n>> So my proposal would be \"Password for user@host:\" instead of just\n>> \"Password:\".\n>> \n>> Problem seen in git 2.26.1...\n> \n> That prompt is generated by ssh, not by git. Any git prompts do say\n> \"Password for user@host\" or similar (e.g., what you see for http\n> authentication).\n> \n> The best we can do is print \"Connecting via ssh to host...\" or similar\n> before running ssh, which would give more context to the \"Password\"\n> prompt. But would probably be annoying for people using key\n> authentication (and we can't know which, because that decision is made\n> internally by ssh).\n> \n> There might be a way to convince ssh to give a more descriptive prompt,\n> but it looks like it may depend on the auth system used by the server.\n> Some quick googling turns up:\n> \n>   \n> https://serverfault.com/questions/849906/how-to-display-userhostname-in-sshd- \n> password-prompt\n> \n\nHi Jeff,\n\nthanks for explaining that! I'm sorry thinking the prompt was from Git.\n\nRegards,\nUlrich\n\n\n\n"}]}