Skip to content

Instantly share code, notes, and snippets.

@davedavis
Created September 10, 2020 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davedavis/0a8b62f6c15c8040faa6c833c82f4cee to your computer and use it in GitHub Desktop.
Save davedavis/0a8b62f6c15c8040faa6c833c82f4cee to your computer and use it in GitHub Desktop.
How to Sign Github Commits From PyCharm
Set up your GPG key and add it to github by:
gpg --full-generate-key
gpg --default-new-key-algo rsa4096 --gen-key
Then, get your GPG ID:
gpg --list-secret-keys --keyid-format LONG
The ID is the bit after the "sec rsa4096/":
gpg --armor --export 3AA5C34371567BD2
Then, edit your .gitconfig file:
Under the [user] section:
signingkey = here_your_key_id
Under the [commit] section (add if it's not there):
[commit]
gpgsign = true
Simple as that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment