On Tue, Oct 04, 2011 at 01:27:57PM +0200, Michael J Gruber wrote: > Still, ksshaskpass's trying to guess a unique key from the prompt text > seems quite hackish to me. But many people will have a Git without > credential-helpers, and a KDE default setup, so hope my post helps > someone besides myself. Hmm. I don't think that pre-credential-helper git actually puts the hostname in the prompt, though. It just says "Username:". So your trick wouldn't work then, would it? > Note that git-credentials-askpass would have a fair chance of doing > better: credential_askpass() knows the username and could pass it to > credential_ask_one(), e.g. by amending the description field, or setting > the first field to "Password for user %(user)". Do you think that would > be worth deviating from the default behavior (i.e. compared to no helper)? I think that git should do that by default. v1.7.7 (and earlier) does: $ git push https://example.com/foo.git Username: Password: With my patches in 'next', it does: $ git push https://example.com/foo.git Username for 'example.com': Password for 'example.com': But it would probably be better to say: $ git push https://example.com/foo.git Username for 'example.com': Password for 'user@xxxxxxxxxxx': The latter is especially useful if you have put a username in your ~/.gitconfig, in which case you get: $ git push https://example.com/foo.git Password for 'user@xxxxxxxxxxx': which is a nice reminder. And it would happen to work with your askpass magic (I also wonder if it should mention the protocol and the repo, but most of the time that isn't relevant, and it does make the prompt harder to read). -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html