Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using GPG to sign your GIT commit


run once to create trustdb

gpg --list-secret-keys --keyid-format LONG



gpg --import public.asc
gpg --import private.asc

tell GIT to use your GPG keys

From the list of GPG keys, copy the GPG key ID you'd like to use. In this example, the GPG key ID is DF52ADDAC81A08A6:

git config --global commit.gpgsign true
git config --global user.signingkey DF52ADDAC81A08A6
git config --global alias.logs "log --show-signature"
git config --global alias.cis "commit -S"
git config --global ""
git config --global "Cédric Walter"
git config --global gpg.program "C:/Program Files (x86)/GnuPG/bin/gpg.exe"


add to your .bashrc

export GPGKEY=DF52ADDAC81A08A6


then you can commit

git cis -m "add new project"


This comment has been minimized.


This comment has been minimized.

Copy link

commented Jun 29, 2018

this doesn't work in IntelliJ PyCharm could you fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.