-
DOWNLAOD gpg4win from: https://www.gpg4win.org/download.html
-
install it
-
Add GnuPG's path to the environment variables: default path is: C:\Program Files (x86)\GnuPG\bin
-
run
gpg --version
-
run
gpg --full-generate-key
-
select (1) default
-
keysize value: 4096
-
key is valid for: 1y
-
next: y
-
Real name:
your name with cast
-
email: 'enter your email'
-
comment:
enter anything
-
press
o
-
now eneter a passphrase that you know you'll remember
-
then run
gpg --list-keys --keyid-format LONG
-
then fetch id from the first line: example: "pub rsa4096/F0E2B4938795 2023-05-27 [SC] [expires: 2024-05-26]" in this id is: "F0E2B4938795"
-
the run
gpg --armor --export <your id>
-
then copy your public key with the comments begin and end
example:
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGRx9qwBEADDPsHt4YvxxzYCBtZAigauG6BYd21Fcs4SPpt0Yu17yKk4YMMv F0knQVEDWdJqcrqk8FZl512SG37VfYgYuPZbgcjBwe3wDixua2qDGZuirWv1CU+y Emyk7WtjMmCy1nfQgHFIW+GCNAjp+/wCwe4fz0aV1JoFVzT1LO3AHx80uLfz8rZA oU17Z7BwArFKMsMtaY7FlnlopHIzWgbOEfh7BtejwF2NGyIjxImTFk7Ni02SJ7ks +hS4Dfpqf9RuQqEISenG82rXHoCkMJmEXjxFKtqgAHYcg0QwhgDoIXNrGUDDRqea 29bstockbnWO3YB4Odr2c3xKxl1itryF1Y8U/lIsdJtF8e02P8jhxdRg85Rggo8h ie9w5EChwhbSybmaHsMuTg5zlr5/KP77Md4ftJ4NzRjbpYK/m0SJ1EAUxJV437L9 T9Q4j88ZH15wgHjRYmSNcwqyPMR+ypZNwKgkrQ3kOcj6IxCHIWdsHtluR0137xtz 73/o2PDzIGS2TL/G8d09LQl/MqSN19CHLbDZHnpnjvRZsptBqPGub8MEofYk =Q5WW -----END PGP PUBLIC KEY BLOCK-----
-
then go to your github profile settings and goto "SSH and GPG keys"
-
then new gpgkey and paste your key there with the title you want
-
now copy KEY ID from github
-
run
git config --global user.signingkey <your key id>
-
then run
git config --global commit.gpgsign true
-
then run
git config --global tag.gpgsign true
-
then open CMD and run
where gpg
for linux:which gpg
-
then run
git config --global gpg.program "<where gpg command result>"
-
then restart your terminal and you're good to go