From: Jeff King <peff@peff.net>
To: "Chris “Kwpolska” Warrick" <kwpolska@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git abuses qt4-ssh-askpass
Date: Mon, 12 May 2014 16:46:42 -0400 [thread overview]
Message-ID: <20140512204642.GC2329@sigill.intra.peff.net> (raw)
In-Reply-To: <CAMw+j7L1YkwjYZibOpuJDnC3FjaRZgBCKBMQcUyT9uRis3heFQ@mail.gmail.com>
On Sat, May 10, 2014 at 10:41:28AM +0200, Chris “Kwpolska” Warrick wrote:
> when I’m using the HTTPS protocol to access repositories, a window
> from /usr/bin/qt4-ssh-askpass comes up. It asks for my “SSH pass
> phrase”, twice. Sadly, it’s wrong. The actual things it wants is the
> username in the first case, and the password used to access the remote
> repository (eg. my GitHub password) in the second question. This is a
> bug, and very misleading behavior.
If you have GIT_ASKPASS or SSH_ASKPASS set and git needs to prompt for a
username or password, it will call that program rather than prompting on
the terminal. It does pass a meaningful label to the askpass program,
but it sounds like your askpass program does not actually display it.
E.g., try setting GIT_TRACE=1. I get:
$ GIT_TRACE=1 SSH_ASKPASS=ssh-askpass-fullscreen git fetch
trace: built-in: git 'fetch'
trace: run_command: 'git-remote-https' 'origin' 'https://github.com/peff/test'
trace: run_command: 'ssh-askpass-fullscreen' 'Username for '\''https://github.com'\'': '
trace: run_command: 'ssh-askpass-fullscreen' 'Password for '\''https://peff@github.com'\'': '
and the askpass program shows me those prompts. You may want to file a
bug report with qt4-ssh-askpass, as most other askpass programs
(including the original ssh-askpass that comes with ssh) respects the
prompt arguments.
That being said, we may be able to improve git, depending on what you
actually wanted to happen. For example, I don't think there is a way to
tell git "even though I have SSH_ASKPASS set, still prompt me on the
terminal". It's been generally assumed that you would only set that
variable if you preferred an external prompt to a terminal prompt.
You may also want to look into git's credential support (see "git help
credential"), which can let you store the username and password in
secure system-provided storage (however from the qt4 above, I guess you
might be using KDE, and I do not know of a KDE Wallet helper; there is
one for GNOME keyring).
-Peff
prev parent reply other threads:[~2014-05-12 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 8:41 Git abuses qt4-ssh-askpass Chris “Kwpolska” Warrick
2014-05-10 8:54 ` Felipe Contreras
2014-05-12 20:46 ` Jeff King [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140512204642.GC2329@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=kwpolska@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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.
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 NNTP newsgroup(s).