gh-gpg-key
Manage GPG keys on GitHub for commit signing
TLDR
SYNOPSIS
gh gpg-key subcommand [options]
DESCRIPTION
gh gpg-key manages GPG keys associated with your GitHub account. GitHub uses these keys to verify signed commits and tags, displaying a "Verified" badge in the web UI when signatures match a registered key.Keys must be exported in ASCII-armored format (e.g. via gpg --armor --export). To enable verification, the key's email must also match a verified email on the account, and commits must be signed locally (e.g. via git config commit.gpgsign true).
PARAMETERS
-t, --title string
Title of the new key (used by add).--yes
Skip the interactive confirmation prompt (used by delete).
SUBCOMMANDS
list
List the GPG keys associated with the authenticated user.add [key-file]
Add a GPG public key to your GitHub account. Reads from stdin if - is passed instead of a file.delete key-id
Remove a GPG key from your GitHub account by its numeric ID.
CAVEATS
Requires authentication via gh auth login. The acting user must have admin:gpg_key scope on their token. Keys uploaded to GitHub cannot be used to decrypt anything — GitHub only stores public keys for signature verification.
SEE ALSO
gh(1), gh-ssh-key(1), gpg(1), git-commit(1)
