From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 10/14] http: use hostname in credential description
Date: Fri, 22 Jul 2011 15:01:53 -0700 [thread overview]
Message-ID: <7vbowmx9da.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110722204749.GC11922@sigill.intra.peff.net> (Jeff King's message of "Fri, 22 Jul 2011 14:47:50 -0600")
Jeff King <peff@peff.net> writes:
> It means that you can get convenient credential handling (whether it's
> because you've configured a username, or you're getting it from a
> wallet, or caching, or whatever) with:
>
> git push https://github.com/peff/git.git &&
> git push https://github.com/peff/foo.git
>
> which should hopefully just prompt you once (and a configured username
> would have to be configured only once for the host).
>
> And it comes at the cost that there's not a good way to use two
> different identities for the same host.
Yes, both "just prompt you once" and "would have to be configured only
once" cut both ways, and that is mildly disturbing to my taste.
If we annotate the remote in .git/config perhaps like this:
[remote "foo"]
url = https://github.com/peff/foo.git
auth_context = "foo project at github"
...
[remote "bar"]
url = https://github.com/peff/bar.git
auth_context = "bar project at github"
and have "git push foo" pass the auth_context to the credential backend,
which can notice the two projects are in different context and cache two
identities under different contexts, would it be a good workaround for the
issue? Then, a remote that does not have auth_context configured would
use "https:github.com" that is machine-generated (in http.c in your code),
but that can easily be overridden if/as necessary.
> I tried to optimize for the common case (many repos under one identity)
> than the uncommon (many identities under one host).
As I am not convinced if this statement is true.
next prev parent reply other threads:[~2011-07-22 22:02 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 7:46 [RFC/PATCH 0/14] less annoying http authentication Jeff King
2011-07-18 7:48 ` [PATCH 01/14] parse-options: add OPT_STRING_LIST helper Jeff King
2011-07-18 7:48 ` [PATCH 02/14] url: decode buffers that are not NUL-terminated Jeff King
2011-07-20 22:16 ` Junio C Hamano
2011-07-18 7:49 ` [PATCH 03/14] improve httpd auth tests Jeff King
2011-07-18 7:49 ` [PATCH 04/14] remote-curl: don't retry auth failures with dumb protocol Jeff King
2011-07-18 7:50 ` [PATCH 05/14] http: retry authentication failures for all http requests Jeff King
2011-07-18 7:50 ` [PATCH 06/14] introduce credentials API Jeff King
2011-07-20 22:17 ` Junio C Hamano
2011-07-22 20:39 ` Jeff King
2011-07-22 21:42 ` Junio C Hamano
2011-07-22 22:16 ` Jeff King
2011-07-21 21:59 ` Junio C Hamano
2011-07-22 20:40 ` Jeff King
2011-07-18 7:50 ` [PATCH 07/14] http: use credential API to get passwords Jeff King
2011-07-18 7:51 ` [PATCH 08/14] look for credentials in config before prompting Jeff King
2011-07-18 7:51 ` [PATCH 09/14] allow the user to configure credential helpers Jeff King
2011-07-18 7:52 ` [PATCH 10/14] http: use hostname in credential description Jeff King
2011-07-20 22:17 ` Junio C Hamano
2011-07-22 20:47 ` Jeff King
2011-07-22 22:01 ` Junio C Hamano [this message]
2011-07-22 22:13 ` Jeff King
2011-08-08 14:37 ` Ted Zlatanov
2011-08-08 17:16 ` Junio C Hamano
2011-08-19 12:01 ` Ted Zlatanov
2011-08-25 20:23 ` Jeff King
2011-08-26 15:29 ` Ted Zlatanov
2011-07-18 7:52 ` [PATCH 11/14] docs: end-user documentation for the credential subsystem Jeff King
2011-07-20 22:17 ` Junio C Hamano
2011-07-18 7:55 ` [PATCH 12/14] credentials: add "cache" helper Jeff King
2011-07-18 7:58 ` [PATCH 13/14] credentials: add "store" helper Jeff King
2011-07-18 7:58 ` [PATCH 14/14] credentials: add "getpass" helper Jeff King
2011-07-18 8:00 ` [RFC/PATCH 0/14] less annoying http authentication Jeff King
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=7vbowmx9da.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).