age
age copied to clipboard
cmd/age: passphrase optionnaly supplied from an environment variable
The passphrase is now read from the AGE_PASSPHRASE environment variable, as an alternative to being requested interactively.
This enables the following usage patterns:
- automation of the encryption, without having to manage an additional private key file
- provide a less error prone way of supplying a passphrase. Copy-pasting to an echo-less prompt, for example, is often hazardous on some platforms.
Hi, How exactly is the env var AGE_PASSPHRASE to be supplied? I was trying age -d --AGE_PASSPHRASE but that doesn't seem to work?
Edit: Never mind, figured out.
This would be nice to see, as it would allow one to use 1Password Secret reference syntax for shared passphrases.
This would be great for automation/CI!
@FiloSottile