credential helpers (was: What's cooking in git.git (Aug 2011, #07; Wed, 24))
- From
Ted Zlatanov <tzz@lifelogs.com>
- Date
- Aug 26, 2011, 15:42 UTC
- Message-ID
- <87aaawnpra.fsf_-_@lifelogs.com>
- In-Reply-To
- <7vhb55i11i.fsf@alter.siamese.dyndns.org>
On Thu, 25 Aug 2011 15:22:49 -0700 Junio C Hamano <gitster@pobox.com> wrote:
JCH> We need to add "auth-domain" support, perhaps from the command line option JCH> and configuration, if we ever need to support such a site.
JCH> We can consider what you already have as the default case for a more JCH> general "we cut off at the hostname and take that as the auth-domain JCH> boundary unless told otherwise". We may not have the way to "tell JCH> otherwise" yet, but as long as we are reasonably confident that we know JCH> how to extend the system in a backward compatible way, it is not a JCH> show-stopper.
How about a config variable with regular expressions like
auth-domain.xyz.url = https://(.*@)?github.com/.*
so then accessing a remote with that URL with or without a username would pass "auth-domain=xyz" to the helper? If there's no defined auth-domain then it's not passed to the helper, so it has to just use the host name (if there is an auth-domain the helper gets it PLUS the hostname, of course).
I specify the "url" sub-key so we can add more auth-domain selection criteria or other functionality in the future.
That gives the user a way to do, for instance:
auth-domain.internalcompany.url = https://.*.mycompany.com/.*
I also wanted to suggest that the credential helper should be able to specify a SSL private user key and the passphrase for it for HTTPS connections to servers that require such keys.
JCH> The primary reason why I wanted to hold this topic off was because of the JCH> frequency of bug report we saw this round to topics _after_ they hit the JCH> "master" branch, indicating that not many people are testing "next" during JCH> the development cycle as they used to in olden days.
I'll be sure to test credential helpers next week.
Thank you Ted