Last active
May 19, 2022 14:40
-
-
Save nemolize/59fbcd92bd6f45dbec8ba7fdda3e4ccf to your computer and use it in GitHub Desktop.
Sign your git commits with a key imported from keybase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: Assuming you have already installed keybase and logged in | |
# This is only for WSL. see: https://github.com/microsoft/WSL/issues/4029 | |
export GPG_TTY=$(tty) | |
# import your public/private keys from keybase | |
keybase pgp export | gpg --import | |
keybase pgp export --secret | gpg --allow-secret-key --import --batch | |
# show your imported keys | |
gpg --list-secret-keys | |
# set automatically sign your commit | |
git config --global user.signingkey <Your hash> | |
# type "trust" in gpg console. and type "5" or whatever you like. (this is needed to avoid warning in git log) | |
gpg --edit-key <Your hash> | |
git config --global gpg.program $(which gpg) # set signing program | |
git config --global commit.gpgsign true # enable signing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment