Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/age: passphrase optionnaly supplied from an environment variable #520

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wj
Copy link

@wj wj commented Aug 15, 2023

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.

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.
@wj wj temporarily deployed to Build, sign, release binaries August 15, 2023 14:10 — with GitHub Actions Inactive
@wj wj temporarily deployed to Build, sign, release binaries August 15, 2023 14:10 — with GitHub Actions Inactive
@wj wj temporarily deployed to Build, sign, release binaries August 15, 2023 14:10 — with GitHub Actions Inactive
@wj wj temporarily deployed to Build, sign, release binaries August 15, 2023 14:10 — with GitHub Actions Inactive
@wj wj temporarily deployed to Build, sign, release binaries August 15, 2023 14:10 — with GitHub Actions Inactive
@wj wj temporarily deployed to Build, sign, release binaries August 15, 2023 14:10 — with GitHub Actions Inactive
@wj wj temporarily deployed to Build, sign, release binaries August 15, 2023 14:10 — with GitHub Actions Inactive
@ghost
Copy link

ghost commented Jan 26, 2024

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.

@jc00ke
Copy link

jc00ke commented Feb 27, 2024

This would be nice to see, as it would allow one to use 1Password Secret reference syntax for shared passphrases.

@gaby
Copy link

gaby commented May 22, 2024

This would be great for automation/CI!

@FiloSottile

@apprehensions
Copy link

#346 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants