git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Feature request: partial URL matching for credential config

From
M Hickford <mirth.hickford@gmail.com>
Date
Sep 28, 2025, 14:13 UTC
Message-ID
<CAGJzqs=8QHB2UjECVpEB2_R85dG1oHg2F2ewDRVpun8XqbboKQ@mail.gmail.com>
In-Reply-To
<CAGJzqsn7BbaVckJ17XhsDHLtmS3OZPBG=oniwe+FRjhEwGc+Eg@mail.gmail.com>
On Sat, 27 Sept 2025 at 19:48, M Hickford <mirth.hickford@gmail.com> wrote:
Show 16 quoted lines
>
> Hi. A git-credential-oauth user would like to define separate
> credential config for two URLs prefixes of the same host (eg.
> https://example.com/org1/* and http://example.com/org2/*)
> https://github.com/hickford/git-credential-oauth/issues/83
>
> I don't believe this is currently possible
> https://git-scm.com/docs/gitcredentials
>
> > If the "pattern" URL does include a path component, then this too must match exactly: the context https://example.com/bar/baz.git will match a config entry for https://example.com/bar/baz.git (in addition to matching the config entry for https://example.com) but will not match a config entry for https://example.com/bar.
>
> Any thoughts on adding support for URL prefix matching?
>
> Example syntax could be credential.https://example.com/org1/*.key
> (explicit wildcard) or credential.https://example.com/org1/.key
> (implicit wildcard)

Here's a simpler example without OAuth -- configuring a personal username for https://git.example.com and an enterprise username for URLs beginning https://git.example.com/syscorp/

credential.https://git.example.com.username=tim credential.https://git.example.com/syscorp/.username=timothy.smith

Previous: M HickfordNext: brian m. carlson
Message 2 of 4 in “Feature request: partial URL matching for credential config”
  1. M HickfordSep 27, 2025
  2. M HickfordSep 28, 2025
  3. brian m. carlsonSep 30, 2025
  4. M HickfordSep 30, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.