Want to add the green "Verified" badge to your GitHub commits? 🚀
In this step-by-step tutorial, I will show you how to configure a GPG key for your GitHub project so your commits become secure, trusted, and identity-verified.
Whether you are a beginner or an experienced developer, this guide will help you set up GPG signing correctly on your system.
1) Install GPG on Linux System
sudo apt install gnupg
2)Generate a New GPG Key
gpg --full-generate-key
Or generate quickly without passphrase using:
gpg --batch --passphrase "" --quick-generate-key "Enter-Your-Email-Address" rsa4096
3) List Your GPG Keys
gpg --list-secret-keys --keyid-format=long
4) Export Your Public Key for GitHub
gpg --armor --export 'gpg-key-id'
5) Add Your GPG Key to GitHub
GitHub → Settings → SSH and GPG Keys → New GPG Key
Paste the key and save.
6)Configure Git to Use Your GPG Key
git config --global user.signingkey 'gpg-key-id'
git config --global commit.gpgsign true
git config --global tag.gpgsign true
7) To test GPG Setup make a dummy commit
If this video helped you, don’t forget to:
👍 Like the video
📝 Drop a comment
🔔 Subscribe for more Linux, DevOps, Cloud & Git tutorials
Thanks for watching — see you in the next video!