Re: [PATCH] Documentation: clarify that cache forgets credentials if the system restarts
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 21, 2022, 11:15 UTC
- Message-ID
- <xmqqo7rxror4.fsf@gitster.g>
- In-Reply-To
- <pull.1447.git.1671610994375.gitgitgadget@gmail.com>
"M Hickford via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: M Hickford <mirth.hickford@gmail.com> > > Make it obvious to readers unfamiliar with Unix sockets.
Is familiarity with sockets required?
Isn't the death of the daemon process that causes the credential data cached in-core of the process?
Show 5 quoted lines
> This command caches credentials in memory for use by future Git > programs. The stored credentials never touch the disk, and are forgotten > -after a configurable timeout. The cache is accessible over a Unix > +after a configurable timeout. Credentials are forgotten sooner if you > +log out or the system restarts. The cache is accessible over a Unix
If we mention "if you log out" here, the readers would also want to learn about credentialCache.ignoreSIGHUP configuration, no?
This is not a new issue, but I am not sure if "never touch the disk" is a honest thing to say (I know there is no "write this in a file" done by the cache daemon, but the running daemon can be swapped out and I do not think we do anything to prevent the in-core structure credential_cache_entry from getting written to the swap.
Taking all of the above together, perhaps something like this?
... caches credentials for use by future Git programs. The
stored credentials are kept in memory of the cache-daemon
process (instead of written to a file) and are forgotten after a
configuarble timeout. The cache-daemon dies with the cached
credentials upon a system shutdown/restart, or when it receives
SIGHUP (i.e. by logging out, you disconnect from the terminal
the daemon was started from); the latter can be disabled with
credentialCache.ignoreSIGHUP configuration. The cache is
accessible over a Unix domain socket, ...