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

Re: [PATCH] credential: warn about git-credential-store [RFC]

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Feb 1, 2025, 10:07 UTC
Message-ID
<Z53ybUCIHPG78Vj2@tapette.crustytoothpaste.net>
In-Reply-To
<pull.1856.git.1738352886190.gitgitgadget@gmail.com>
On 2025-01-31 at 19:48:06, M Hickford via GitGitGadget wrote:
Show 11 quoted lines
> From: M Hickford <mirth.hickford@gmail.com>
> 
> git-credential-store saves secrets unencrypted on disk.
> 
> Warn the user before they type their password, suggesting alternative
> credential helpers.
> 
> An alternative could be to warn in "credential-store store". A
> disadvantage is that the user wouldn't see the warning until after they
> typed their password, which is less helpful. The warning would appear
> again every time the user authenticated, which feels too frequently.

I don't think this is a good idea. While it's typically recommended to use a different credential helper, it can be difficult to do so in an environment where you don't have a desktop, since all of the major helpers use the system keychain, where a desktop is required.

If you have such an environment (such as a remote system) and can't use SSH (because your corporate environment only allows HTTPS), then you really don't have many, if any, alternatives[0]. All warning in this case is going to do is just annoy the user, especially if they have many such systems.

If we are going to do this, I'd recommend using the advice system, so that users can just disable the warning.

[0] Okay, I lied. I have a tool called Lawn (local spawn) which allows you to run a command on your laptop or desktop from the remote machine, such as a credential helper, but it's not in widespread use and I don't think it's polished enough to recommend here.

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Junio C Hamano
Message 5 of 5 in “credential: warn about git-credential-store [RFC]”
  1. credential: warn about git-credential-store [RFC]M Hickford via GitGitGadget, Jan 31, 2025
  2. Junio C HamanoJan 31, 2025
  3. Jeff KingFeb 1, 2025
  4. Junio C HamanoFeb 2, 2025
  5. brian m. carlsonFeb 1, 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.