- Download GPG4Win
- Open CMD
gpg --full-gen-key
- Please select what kind of key you want:
(4) RSA (sign only)
- RSA keys may be between 1024 and 4096 bits long.
What keysize do you want?
4096
- Please specify how long the key should be valid.
0 = key does not expire
- Key does not expire at all
Is this correct? (y/N)
Y
- name , email , comment
- Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit?
O
After Creating the GPG key
git config --global user.signinkey <key>
git config --global commit.gpgsing true
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
GPG ID
gpg --list-secret-keys --keyid-format LONG
For github public key:
gpg --armor --export <key id>
password manager wont pop up ? echo "test" | gpg --clearsign
this should fix this.
For Linux
export GPG_TTY=$(tty)
add this to bashrc or zshrc
DO NOT USE TERMINAL . USE gold old CMD.