Implementation
git config push.gpgsign if-asked
git config commit.gpgsign true
git config tag.gpgsign true
gpg --list-secret-keys --keyid-format long
git config user.signingkey 0123346789ABCDEF
git config user.name Spam Killer
git config user.email spamkiller@dispossable.email
Usage
git setup https://github.com/cli/cli
# or for existing repo
git setup
# works with multiple repos too
git setup ~/Projects/OSS/{ repo1, repo2 }
git setup --gpgsign hotfix/big-bug feature/branch
git setup --signingkey 'v3.0.0-[alpha|beta].*'
Implementation
gpgsignsigningkeyfromlist-secret-keysUsage
git setup --signingkey 'v3.0.0-[alpha|beta].*'--gpgsignand--signingkeyshould be the same (to avoid confusion)