Skip to content

Instantly share code, notes, and snippets.

View MohanSha's full-sized avatar
👨‍💻
Hello stranger looking at my work!

Mohan Sha MohanSha

👨‍💻
Hello stranger looking at my work!
View GitHub Profile
@MohanSha
MohanSha / gpg_git_signing.md
Created February 18, 2022 11:23 — forked from alopresto/gpg_git_signing.md
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@MohanSha
MohanSha / TestGistCreate.txt
Created June 19, 2021 22:35
This is a test gist
Test Content
@MohanSha
MohanSha / TestGistCreate.txt
Created June 19, 2021 22:35
This is a test gist
Test Content
@MohanSha
MohanSha / TestPublicGistUsername.txt
Created June 19, 2021 22:35
This is a test gist
Test Content
Test Content
@MohanSha
MohanSha / TestPublicGistUsername.txt
Created June 19, 2021 22:35
This is a test gist
Test Content
@MohanSha
MohanSha / TestPublicGistUsername.txt
Created June 19, 2021 22:35
This is a test gist
Test Content
@MohanSha
MohanSha / TestCreatePublicGist.txt
Created June 19, 2021 22:35
This is a test gist
Test Content
@MohanSha
MohanSha / TestGistDelete.txt
Created June 19, 2021 22:35
This is a test gist
Test Content
@MohanSha
MohanSha / TestGistCreate.txt
Created June 19, 2021 22:35
This is a test gist
Test Content