The guide below is highly inspired by the official guide: Generating a new GPG key. This is more condenses version tailored for Fedora 29. Open terminal and do the following:
Initiate new key generation by running gpg2 --full-gen-key
4096
0
(key does not expire)y
Then you will be prompted to supply user information
gpg: key XXXXXXXXXXXXXXXX marked as ultimately trusted
.You will now need to add the full key to your Github account:
gpg --armor --export XXXXXXXXXXXXXXXX
git config --global gpg.program gpg2
.git config --global user.signingkey XXXXXXXXXXXXXXXX
You need to also configure Visual Studio code:
enableCommitSigning