1. Run this command gpg --full-generate-key
The output should be:
2. It will prompt what type of key you want. Please choose the key type you desire.
3. In addition, it will prompt how many bits you would like the key to be key.
**NOTE** The screenshot attached is for RSA keys.
4. Now, it will prompt you to choose if the keys will expire.
5. Lastly, it will prompt you to add your Name which will be the USER-ID:
6. Finally, the GPG is now created.
***NOTE*** INSIDE THE HIGHLIGHTED RED BOX IS THE NEWLY CREATED GPG KEY
7. Run these two commands which will then output the private.key and public.key files into
~/private.key AND/OR ~/public.key
gpg --output private.key --armor --export-secret-keys <YOUR_GPG_KEY> gpg --output public.key --armor --export <YOUR_GPG_KEY>In addition, run this command to add your public.key to the keystore.
apt-key add <YOUR_PUBLIC_KEY_NAME.key>The command will give an “OK” output in the CLI if it was added successfully.
8. To view if it was added to the keystore please run the following command:
apt-key list
The following screenshot will be the output of “apt-key list”