Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GPG key non-interactive one-liner with variable substitution
printf "Key-Type: 1\nKey-Length: 2048\nSubkey-Type: 1\nSubkey-Length: 2048\nName-Real: %s\nName-Email: %s\nExpire-Date: 0\nPassphrase: %s" $USER_GPG $EMAIL_GPG $PASSPHRASE_GPG | gpg --batch --gen-key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment