Git credential cache and store backend interoperability
0 reputation · 11 Aug 2023, 20:37 UTC
Goal: determine whether Git shares authentication data between the in-memory cache helper and the plaintext store helper when both are listed under credential.helper.
Git tries each configured helper in order, but backends do not synchronize automatically. Behavior may vary by Git build and platform. The cache helper keeps secrets in a per-user daemon until its timeout, while store appends them to ~/.git-credentials without expiration. It is unclear whether a credential supplied by cache is later persisted by store, or whether an expired cache entry remains available through store for the same remote.
Does Git automatically write a credential returned by cache into store when both helpers are active? If cache discards a credential after its timeout, can store still supply it for the same host? Is there a supported mechanism to move credentials from cache to store without prompting the user again?