git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "M Hickford via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, M Hickford <mirth.hickford@gmail.com>
Subject: Re: [PATCH] Documentation: clarify that cache forgets credentials if the system restarts
Date: Wed, 21 Dec 2022 20:15:59 +0900	[thread overview]
Message-ID: <xmqqo7rxror4.fsf@gitster.g> (raw)
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?

>  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, ...


  reply	other threads:[~2022-12-21 11:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21  8:23 [PATCH] Documentation: clarify that cache forgets credentials if the system restarts M Hickford via GitGitGadget
2022-12-21 11:15 ` Junio C Hamano [this message]
2022-12-22  2:41   ` Jeff King
2023-01-28 20:08     ` M Hickford
2022-12-21 22:09 ` brian m. carlson
2023-01-28 20:09 ` [PATCH v2] " M Hickford via GitGitGadget
2023-01-28 20:13   ` [PATCH v3] " M Hickford via GitGitGadget
2023-01-29  6:48     ` Jeff King
2023-01-29 17:26       ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo7rxror4.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=mirth.hickford@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).