Files
Dominik Schulz 100194de58 Warn when keyring is unavailable (#3429)
* [UX] warn when system keyring is unavailable

Emit a one-time warning when age.usekeychain is enabled but no OS keyring
provider is available, so users understand why passphrase caching won't
persist across sessions. Also warn when writing a passphrase to the OS
keyring fails at runtime.

The cacher.Set and askPass.Passphrase signatures now accept a context.Context
to support the warning output. effectivePwCallback is updated accordingly.

Co-authored-by: Adriano Caloiaro <code@adriano.fyi>
Closes #3357

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* fix: address review feedback for PR #3357

- Fix osKeyring.Get to track the actual key in knownKeys instead of
  the package-level constant "age" (o.knownKeys[key] not o.knownKeys[name])
- Replace %%w with %%v in debug.Log calls where error wrapping is not
  applicable (debug.Log uses fmt.Fprintf internally)

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* fix: Fix whitespace error

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Adriano Caloiaro <code@adriano.fyi>
2026-05-16 21:12:29 +02:00
..