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

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, ...
Previous: M Hickford via GitGitGadgetNext: Jeff King
Message 2 of 9 in “Documentation: clarify that cache forgets credentials if the system restarts”
  1. Documentation: clarify that cache forgets credentials if the system restartsM Hickford via GitGitGadget, Dec 21, 2022
  2. Junio C HamanoDec 21, 2022
  3. Jeff KingDec 22, 2022
  4. Documentation: clarify that cache forgets credentials if the system restartsM Hickford, Jan 28, 2023
  5. brian m. carlsonDec 21, 2022
  6. Documentation: clarify that cache forgets credentials if the system restartsM Hickford via GitGitGadget, Jan 28, 2023
  7. Documentation: clarify that cache forgets credentials if the system restartsM Hickford via GitGitGadget, Jan 28, 2023
  8. Jeff KingJan 29, 2023
  9. Junio C HamanoJan 29, 2023

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.