You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9. Paste the text below, substituting in the GPG key ID you'd like to use. In
this example, the GPG key ID is `3AA5C34371567BD2`:
```
$ gpg --armor --export 3AA5C34371567BD2
# Prints the GPG key ID, in ASCII armor format
```
10. Copy your GPG key, beginning with `-----BEGIN PGP PUBLIC KEY BLOCK-----`
and ending with `-----END PGP PUBLIC KEY BLOCK-----`.
Adding a new GPG key to your GitHub account
-------------------------------------------
1. In the upper-right corner of any page, click your profile photo, then click
Settings.
2. In the user settings sidebar, click SSH and GPG keys.
3. Click New GPG key.
4. In the "Key" field, paste the GPG key you copied when you generated your GPG
key.
5. Click Add GPG key.
6. To confirm the action, enter your GitHub password.
Getting GPG Keys
----------------
1. Open Git Bash
2. Use the `gpg --list-secret-keys --keyid-format LONG` command to list GPG keys for which you have both a public and private key. A private key is required for signing commits or tags.
3. From the list of GPG keys, copy the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: