Re: Git ksshaskpass to play nice with https and kwallet
- From
Jeff King <peff@peff.net>
- Date
- Oct 4, 2011, 12:43 UTC
- Message-ID
- <20111004124344.GA30162@sigill.intra.peff.net>
- In-Reply-To
- <4E8AF812.5090906@drmicha.warpmail.net>
On Tue, Oct 04, 2011 at 02:12:02PM +0200, Michael J Gruber wrote:
Show 8 quoted lines
> > The latter is especially useful if you have put a username in your > > ~/.gitconfig, in which case you get: > > I'm actually wondering why git can't infer the user from > > https://user@host.com > > with last week's next, at least.
It can, and it has for some time. Part of the configurable-username thing was that it would be way nicer to just use a user-agnostic URL, because it means it's easier to share with other people.
Show 12 quoted lines
> > $ git push https://example.com/foo.git > > Password for 'user@example.com': > > > > 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). > > With the above, I can probably do without any magic: 'example.com' would > be the wallet key for the username (if I let the wallet store it) and > 'user@example.com' the key for the password, whether the username comes > from the wallet or from the config. (Again, why not from the URL?)
Yeah, sorry, I should have said "ksshaskpass's magic". :)
And yes, it can come from the URL. Mentioning the user in the password prompt is not as useful a reminder if it comes from:
$ git push https://user@example.com/foo.git
but, if it's something like:
$ git clone https://user@example.com/foo.git [months pass]
$ git push Password for 'user@example.com':
then it's a nice reminder.
-Peff