* GIT/SSH_ASKPASS used for username input in https:// URLs
@ 2019-05-06 13:47 Andreas Krey
2019-05-07 7:36 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Krey @ 2019-05-06 13:47 UTC (permalink / raw)
To: git
Hi everyone,
there is an interesting wart around prompt.c -
PROMPT_ECHO isn't used in invoking an external helper program.
Thus, if I clone something on https (which requires auth for that),
and have SSH_ASKPASS set, I will get two GUI *password* prompts,
even though the first one will indicate in the title that it *is*
asking for the username.
But basically, given the trivial protocol of SSH_ASKPASS, there
doesn't seem to be any way to properly fix this without support
from any desktop environment that sets SSH_ASKPASS. :-(
The best I can currently tell my users is to use the
[credentials "https:/..."]
configuration to fix the username.
But if we can't fix this, maybe we can at least point this out in the docs?
- Andreas
--
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GIT/SSH_ASKPASS used for username input in https:// URLs
2019-05-06 13:47 GIT/SSH_ASKPASS used for username input in https:// URLs Andreas Krey
@ 2019-05-07 7:36 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2019-05-07 7:36 UTC (permalink / raw)
To: Andreas Krey; +Cc: git
On Mon, May 06, 2019 at 03:47:18PM +0200, Andreas Krey wrote:
> there is an interesting wart around prompt.c -
> PROMPT_ECHO isn't used in invoking an external helper program.
>
> Thus, if I clone something on https (which requires auth for that),
> and have SSH_ASKPASS set, I will get two GUI *password* prompts,
> even though the first one will indicate in the title that it *is*
> asking for the username.
>
> But basically, given the trivial protocol of SSH_ASKPASS, there
> doesn't seem to be any way to properly fix this without support
> from any desktop environment that sets SSH_ASKPASS. :-(
Yep. If you haven't seen it, there's more discussion in this recent
thread:
https://public-inbox.org/git/20190429234028.GA24069@sigill.intra.peff.net/
> The best I can currently tell my users is to use the
> [credentials "https:/..."]
> configuration to fix the username.
Yes, that works. Or a credential helper could prompt with a better
interface (but AFAIK, the only one written that does so is the Windows
one).
> But if we can't fix this, maybe we can at least point this out in the
> docs?
Sounds like a good suggestion. Where would you look for it? In the
description of GIT_ASKPASS / core.askpass?
-Peff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-07 7:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 13:47 GIT/SSH_ASKPASS used for username input in https:// URLs Andreas Krey
2019-05-07 7:36 ` Jeff King
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).