GPG¶
Generation¶
Generate Key¶
Tip
For privacy, use the name on GitHub and the @noreply email provided by GitHub
Note
Try the following command when key generation fails due to "no GPG agent running"
If this fails, run and close KleopatraGet Keys¶
sec rsa4096/1XX1X11111000XX0 2016-07-01 [SC]
// ^----Key ID----^ -> λ
A123456AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
uid [ultimate] Octocat <octocat@github.com>
Usage¶
Sign Commits¶
Get Public Signature¶
# Windows PowerShell
gpg --export --armor λ | Set-Clipboard
# macOS (zsh or Bash)
gpg --export --armor λ | pbcopy
Backup¶
Create Backup¶
gpg --export --armor λ > GitHub-CommitSigningKey-Public.asc
gpg --export-secret-keys --armor λ > GitHub-CommitSigningKey-Private.asc
Note
The exported secret key is still secure. It will require password (passphrase) before it can be imported and used.