From: Jeff King <peff@peff.net>
To: Ryan Vu <ryanvu87@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: gitconfig - interaction between credential.helper and includeIf
Date: Tue, 25 Jun 2024 09:20:01 -0400 [thread overview]
Message-ID: <20240625132001.GA535756@coredump.intra.peff.net> (raw)
In-Reply-To: <CAF4erGWF+Lx=K09yFhd_abC2M5b5Ab0vM2uehkdVmridmsHqDg@mail.gmail.com>
On Mon, Jun 24, 2024 at 10:59:33PM -0700, Ryan Vu wrote:
> I created the following files:
>
> ``` ~/workspace/.gitconfig-workspace
> [credential]
> helper = store --file ~/workspace/.git-credentials-workspace
> ```
>
> ``` ~/.gitconfig
> [credential]
> helper = store
> [includeIf "gitdir:~/workspace/"]
> path = ~/workspace/.gitconfig-workspace
> ```
credential.helper is a multi-valued config key that forms a list, and
Git will try each one in sequence. So in your ~/workspace repositories,
you've configured _two_ helpers: a vanilla "store" and one with the
--file option.
You can reset the list with an empty string. So putting:
[credential]
helper =
helper = store --file ~/workspace/.git-credentials-workspace
in your .gitconfig-workspace would do what you want.
-Peff
next prev parent reply other threads:[~2024-06-25 13:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 5:59 gitconfig - interaction between credential.helper and includeIf Ryan Vu
2024-06-25 13:20 ` Jeff King [this message]
2024-06-25 16:53 ` Ryan Vu
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=20240625132001.GA535756@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=ryanvu87@gmail.com \
/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).