From: M Hickford Date: Sun, 28 Sep 2025 14:13:55 GMT Subject: Re: Feature request: partial URL matching for credential config Message-ID: In-Reply-To: On Sat, 27 Sept 2025 at 19:48, M Hickford wrote: > > 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