Skip to content

Instantly share code, notes, and snippets.

@webarchitect609
Created February 13, 2022 20:04
Show Gist options
  • Save webarchitect609/9413bfbd6f3a35b6282974b6f10683ec to your computer and use it in GitHub Desktop.
Save webarchitect609/9413bfbd6f3a35b6282974b6f10683ec to your computer and use it in GitHub Desktop.
Disable or enable GPG signing for git repo
# Globally enable gpg signing.
# Now you will be forced to decide should you disable or enable gpg signing feature for each repo.
# If you don't do anything, making a commit will be impossible.
git config --global commit.gpgsign true
# Disable GPG-signing for this repo only
git config --local commit.gpgsign false
# Enable GPG-signing for this repo only by setting the GPG key id
git config --local user.signingkey $KEY_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment