gpg --full-generate-keyPlease select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection? 4RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (3072) 4096
Requested keysize is 4096 bits
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0
Key does not expire at all
Is this correct? (y/N) y
GnuPG needs to construct a user ID to identify your key.
Real name: <Your_Name>
Email address: <github_Email>
Comment: <My computer description>
You selected this USER-ID:
"Your_Name (My computer description) <github_Email>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: AllowSetForegroundWindow(32500) failed: Access is denied.
gpg: ../trustdb.gpg: trustdb created
gpg: key XXXXXXXXXXXXX012 marked as ultimately trusted
gpg: directory '../gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '../gnupg/openpgp-revocs.d\YYYYYYYYYYYYYYYYYYYYYYYYXXXXXXXXXXXXX012.rev'
public and secret key created and signed.
Note that this key cannot be used for encryption. You may want to use
the command "--edit-key" to generate a subkey for this purpose.
pub rsa4096/AAAAAAAAABBBBBBB 2021-09-22 [SC]
YYYYYYYYYYYYYYYYYYYYYYYYXXXXXXXXXXXXX012
uid Your_Name (My computer description) <github_Email>Configure git to use GPG
git config --global user.signingkey AAAAAAAAABBBBBBBGit has it's own version (windows for now) of GPG so set it to use the correct version.
git config --global gpg.program "C:/Program Files (x86)/GnuPG/bin/gpg.exe"git config --global gpg.program gpggpg --list-secret-keys --keyid-format=longgpg --armor --export YYYYYYYYYYYYYYYYYYYYYYYYXXXXXXXXXXXXX012Key to copy to github GPG
-----BEGIN PGP PUBLIC KEY BLOCK-----
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ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YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
AAAAA
-----END PGP PUBLIC KEY BLOCK-----git config --global commit.gpgsign truegit commit -S -m "your commit message"Add the following to your shell: ~/.bashrc, ~/.zshrc, etc.
# Enable passphrase prompt for gpg - export GPG_TTY=$TTY - might be better on some systems.
export GPG_TTY=$(tty)
echo "GPG Login" | gpg --clearsign > /dev/null 2>&1[Windows] GUI - Append the windows pinentry.exe to WSL via CLI
echo -e "# GPG4Win\npinentry-program \"/mnt/c/Program Files (x86)/gnupg/bin/pinentry-basic.exe\"\n\n# Newer version of Gpg4win\n# pinentry-program \"/mnt/c/Program Files (x86)/Gpg4win/bin/pinentry.exe\"" >> ~/.gnupg/gpg-agent.conf
[~/.gnupg/gpg-agent.conf] - modify the file and add the following
# GPG4Win pinentry-program "/mnt/c/Program Files (x86)/gnupg/bin/pinentry-basic.exe" # Newer version of Gpg4win # pinentry-program "/mnt/c/Program Files (x86)/Gpg4win/bin/pinentry.exe"