Skip to content

Instantly share code, notes, and snippets.

@ryanlewis
Created April 28, 2026 15:57
Show Gist options
  • Select an option

  • Save ryanlewis/844ac531d90e7d176c67ed6040edcf87 to your computer and use it in GitHub Desktop.

Select an option

Save ryanlewis/844ac531d90e7d176c67ed6040edcf87 to your computer and use it in GitHub Desktop.
Ryan Lewis — personal GPG key (ryan@rlew.io): fetch + encrypt commands

Ryan Lewis — personal GPG key

For sending me encrypted things in a personal context (ryan@rlew.io).

Key

Field Value
Email ryan@rlew.io (also ryan@wpyz.org)
Key ID C4CF8705BF891FBC
Fingerprint 3583 DC17 D6E1 EAEB C573 7291 C4CF 8705 BF89 1FBC
Algorithm RSA 4096

Published on keys.openpgp.org and on GitHub (ryanlewis).

Fetching the public key

Via keys.openpgp.org (preferred)

gpg --keyserver keys.openpgp.org --recv-keys C4CF8705BF891FBC

Via GitHub API (unauthenticated)

curl -sS https://api.github.com/users/ryanlewis/gpg_keys \
  | jq -r '.[] | select(.emails[]?.email == "ryan@rlew.io") | .raw_key' \
  | gpg --import

Verify the fingerprint

Always cross-check against an out-of-band channel before trusting:

gpg --fingerprint ryan@rlew.io
# expect: 3583 DC17 D6E1 EAEB C573  7291 C4CF 8705 BF89 1FBC

Encrypting something to me

ASCII-armoured ciphertext is safe to paste into chat, email, a paste site, anywhere.

Encrypt a file

gpg --encrypt --armor --recipient ryan@rlew.io secrets.txt
# produces secrets.txt.asc — send that

Encrypt a string from stdin → clipboard (macOS)

echo "the secret" | gpg --encrypt --armor --recipient ryan@rlew.io | pbcopy

Encrypt + sign (recommended if you have your own key)

Adds a signature so I can verify it really came from you:

gpg --encrypt --sign --armor --recipient ryan@rlew.io secrets.txt

One-shot trust override

If gpg prompts There is no assurance this key belongs to the named user, you haven't set explicit trust on my key. For a one-off, bypass with:

gpg --encrypt --armor --trust-model always --recipient ryan@rlew.io secrets.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment