Skip to content

Instantly share code, notes, and snippets.

@SaicharanKandukuri
Last active September 23, 2023 09:59
Show Gist options
  • Save SaicharanKandukuri/e1ef3f33b3c73ff35a1180256d58cdb7 to your computer and use it in GitHub Desktop.
Save SaicharanKandukuri/e1ef3f33b3c73ff35a1180256d58cdb7 to your computer and use it in GitHub Desktop.
get verified badge for commits except from github site Github.com

read this first https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key


change

to better copy key use

gpg --armor --export <key_ID> > key.txt

open key.txt from notepad and use it in github

read this for adding GPG key to github https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/adding-a-new-gpg-key-to-your-github-account

sign local commits

  • first make GitHub know which software to use
git config --global gpg.program "/usr/bin/gpg"
  • then say what key to use with KEY ID (ID of the onw which uploaded in git)
git config --global user.signingkey <KEY_ID>
  • enable signing globally
git config --global commit.gpgsign true
  • for single repo
    • cd to your repo cd /path/to/repo then
git config commit.gpgsign true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment