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

Re: [PATCH] docs: discuss caching personal access tokens

From
M Hickford <mirth.hickford@gmail.com>
Date
Jan 10, 2025, 21:25 UTC
Message-ID
<CAGJzqsnGt7GSdNT0ToK5WRvQVvtxppRxx6W_y5sHNu2t2k_Rzw@mail.gmail.com>
In-Reply-To
<xmqqwmf27cvv.fsf@gitster.g>
On Fri, 10 Jan 2025 at 18:16, Junio C Hamano <gitster@pobox.com> wrote:
Show 30 quoted lines
>
> "M Hickford via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: M Hickford <mirth.hickford@gmail.com>
> >
> > Describe problems storing personal access tokens in git-credential-cache
> > and suggest alternatives.
>
> > +PERSONAL ACCESS TOKENS
> > +----------------------
> > +
> > +Some remotes accept personal access tokens, which are randomly
> > +generated and hard to memorise. They typically have a lifetime of weeks
> > +or months.
> > +
> > +git-credential-cache is inherently unsuitable for persistent storage of
> > +personal access tokens. The credential will be forgotten after the cache
> > +timeout. Even if you configure a long timeout, credentials will be
> > +forgotten if the daemon dies.
>
> Very true.
>
> > +To avoid frequently regenerating personal access tokens, configure a
> > +credential helper with persistent storage.
>
> Like libsecret and osxkeychain, you mean?  I am wondering if we want
> to be a bit more helpful by being explicit.  I think there is a
> section in a maual page that has a list of known and often-used
> credential backends, so referring the readers to that section may be
> helpful.

I agree, explicit is more helpful. I shall expand that gitcredentials.txt section in patch v2.

Show 6 quoted lines
>
> > Alternatively, configure an
> > +OAuth credential helper to generate credentials automatically. See
> > +linkgit:gitcredentials[7].
>
> Indeed.
Previous: rsbecker@nexbridge.comNext: M Hickford via GitGitGadget
Message 4 of 7 in “docs: discuss caching personal access tokens”
  1. docs: discuss caching personal access tokensM Hickford via GitGitGadget, Jan 9, 2025
  2. Junio C HamanoJan 10, 2025
  3. rsbecker@nexbridge.comJan 10, 2025
  4. M HickfordJan 10, 2025
  5. 0/2 docs: discuss caching personal access tokensM Hickford via GitGitGadget, Jan 10, 2025
  6. 1/2 docs: list popular credential helpersM Hickford via GitGitGadget, Jan 10, 2025
  7. 2/2 docs: discuss caching personal access tokensM Hickford via GitGitGadget, Jan 10, 2025

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.