Skip to content

Instantly share code, notes, and snippets.

@stctheproducer
Forked from sinewalker/keybase.md
Created January 8, 2025 21:20
Show Gist options
  • Select an option

  • Save stctheproducer/4856214d6960ceedec078914d7edcdb0 to your computer and use it in GitHub Desktop.

Select an option

Save stctheproducer/4856214d6960ceedec078914d7edcdb0 to your computer and use it in GitHub Desktop.
How to import pub/sec PGP keys from keybase to your local GPG keyring.

Import Keybase PGP to GPG

After installing the keybase command-line tool onto a new / fresh computer, you may want to import your PGP key to the local keyring so that you may use the keys with GPG.

Import your PUBLIC PGP key:

keybase pgp export|gpg --import -

For your SECRET PGP key, you have to be more assertive:

keybase pgp export -s|gpg --allow-secret-key-import --import -

You will then want to trust the keys as your own, so that GPG can be "sure" they're safe to use

gpg --edit-key you@keybase.io
trust
5
y
save
@stctheproducer

Copy link
Copy Markdown
Author

For the public key to update in keybase, run the following when editing the key

setpref AES256 AES192 AES CAST5 3DES SHA512 SHA384 SHA256 SHA224 RIPEMD160 SHA1 ZLIB BZIP2 ZIP Uncompressed ks-modify no-mdc

@stctheproducer

stctheproducer commented Mar 31, 2026

Copy link
Copy Markdown
Author

List Keys to Find KEY_ID

gpg --list-secret-keys --keyid-format LONG

Export to keyserver

gpg --send-keys KEY_ID

Or upload to keys.openpgp.org

gpg --export KEY_ID | curl -T - https://keys.openpgp.org

Update GitHub GPG keys

gpg --armor --export KEY_ID | curl -H "Content-Type: application/json" -X POST -d @- https://api.github.com/user/gpg_keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment