list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <>
To: Johannes Schindelin <>
Cc: "Jarosław Honkis via GitGitGadget" <>,, "Junio C Hamano" <>,
	"Jarosław Honkis" <>
Subject: Re: [PATCH 1/1] credential: do not mask the username
Date: Tue, 30 Apr 2019 18:21:46 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, Apr 30, 2019 at 06:07:15PM -0400, Johannes Schindelin wrote:

> >   2. Use another tool besides askpass. I don't know of any askpass
> >      implementations that take something like our ECHO flag, but there
> >      are lots of other tools. I doubt there's any easy portable
> >      solution, though. And anyway, credential helpers are a much more
> >      advanced version of this anyway, so I'd probably steer people in
> >      that direction.
> [...]
> How about inventing a new convention: we could set `GIT_ASKPASS_FLAGS`
> as an environment variable that contains whitespace-delimited flags, in
> the current instance just "echo"?
> We could then teach `git-gui--askpass` to heed that.

Yeah, I almost suggested something like that for my (2) above, but I
couldn't actually find an askpass implementation that supported this
(though there are lots of general dialog tools that do).

But today I learned about git-gui--askpass. :)

So yeah, I think that is a solution in the right direction, but it may
not be helping that many people if it is specific to git-gui--askpass.

> Mind you, these days, this patch is a lot less necessary because Git for
> Windows (which is *the* platform where you'd expect no terminal to be
> available when fetching/pushing, right?) defaults to using the Git
> Credential Manager [*1*].

The no-terminal thing isn't specific to Windows. You can imagine
somebody triggering "git fetch" from any GUI on Linux that no longer has
a controlling terminal (because the GUI was spawned by a desktop manager
or some such).

But I definitely agree that credential helpers are the right way to do
fancier prompting. AFAIK your GCM is the only one which actually does
prompting (most of the rest are just key-store interfaces), but it's
definitely inbounds and was part of the original intent. For usernames,
I personally just stick mine in credential.$URL.username config, since
they're obviously not a secret. But then my habits may not match most
users. :)

> What do you think about the `GIT_ASKPASS_FLAGS` thing? It is not perfect,
> but it could be used at least in conjunction with `git-gui--askpass` (or
> with other helpers that would make use of this side channel to receive
> more information about the way they should present the question to the
> user)?

It seems perfectly reasonable to me, but if it were me, I think this:

> Alternatively, I could simply drop that patch from Git for Windows, as it
> really only concerns users who override the default, opting out of using
> Git Credential Manager.

would be the path I would take.


  reply	other threads:[~2019-04-30 22:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 22:06 [PATCH 0/1] " Johannes Schindelin via GitGitGadget
2019-04-29 22:06 ` [PATCH 1/1] " Jarosław Honkis via GitGitGadget
2019-04-29 22:12   ` Eric Sunshine
2019-04-29 23:06     ` Johannes Schindelin
2019-04-29 23:40   ` Jeff King
2019-04-30 22:07     ` Johannes Schindelin
2019-04-30 22:21       ` Jeff King [this message]
2019-05-03  9:09         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

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