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

Re: Filter smudge for secret restoration: no disk access?

From
Chris Torek <chris.torek@gmail.com>
Date
Nov 25, 2025, 08:55 UTC
Message-ID
<CAPx1GveYzEs_iAo2oV2OgoGbJJfw4Q0VVzRApEwCOMUAAY_v1Q@mail.gmail.com>
In-Reply-To
<DEH58DEF5MGO.2CFIKCM2CAQY2@gmail.com>
On Mon, Nov 24, 2025 at 10:40 AM Kache Hit <kache.hit@gmail.com> wrote:
Show 6 quoted lines
> I'm familiar with this practice, e.g. committing an `.env.template`
> which is used to create an `.env` file with secrets within.
>
> However, this is my dotfiles repo that includes `~/.config`. There are
> config files that store credentials right next to configuration, managed
> by software that I don't control.

My technique for this is that my dotfiles are in a repository where they are named "profile", "bashrc", "gitconfig", and so on. These get installed by my dotfiles-installer as $HOME/.profile, etc. The installer (my own creation, tuned to my personal needs and not really suitable for anyone else) builds the target files as needed.

(The thing probably needs a redesign and rewrite since newer software messes with these files more dynamically at this point, but I have not had to do that yet. So far I haven't needed to do the "update repository from active files" part, which would be harder.)

The reason for naming them without the leading dot is to make it abundantly obvious during editing whether I'm on the template or the actual config file.

As you've seen, there are more issues with going back in history (to points where various files didn't exist yet). This sidesteps most of these.

Chris
Previous: Kache Hit
Message 7 of 7 in “Filter smudge for secret restoration: no disk access?”
  1. Kache HitNov 24, 2025
  2. Johannes SixtNov 24, 2025
  3. Chris TorekNov 24, 2025
  4. Kache HitNov 24, 2025
  5. Junio C HamanoNov 24, 2025
  6. Kache HitNov 25, 2025
  7. Chris TorekNov 25, 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.