Skip to content

Instantly share code, notes, and snippets.

@adarsh-chakraborty
Created April 22, 2022 14:46
Show Gist options
  • Save adarsh-chakraborty/ef5b10ed5458e8558ec6176bc023e8ce to your computer and use it in GitHub Desktop.
Save adarsh-chakraborty/ef5b10ed5458e8558ec6176bc023e8ce to your computer and use it in GitHub Desktop.
Make verified commits on github.

Get your commits verified on github!

Step 1: Check if gpg installed

gpg --version

Step 2: Generate a key

gpg --full-gen-key

Select (1) option, (RSA and RSA) You can also select 4th option (RSA Sign Only)

Enter key size between 1024 and 4096
4096
Expiry:
Enter 0 for no expiry, then proceed with typing y for confirmation.
Now, it will ask some basic details like
Name,
Email
Comment (Entering your profession here is a good idea)
Enter pass phrase

done.

Get the newly generated gpg key,

gpg --armour --export <keyIDHere_DEMOX1234>

You can get the keyID by

gpg --list-keys

Copy the entire key, paste on github gpg keys.


Set the gpg key for git.

git config --global user.signingkey <keyIDHere_DEMOX1234>

You can get the keyID by

gpg --list-keys

Enable signing in git:

git config --global commit.gpgsign true

Open vscode, and settings search for git enable signing in settings.

Make sure Enable commit Signing option is checked.

All done Make Verified commits now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment