-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Allow GPG signing on cz bump for tags and commits #347
Comments
I'm haven't use If you could provide a mini-tutorial/explanation on how to do on a CI I'll give it a try. Otherwise we won't be able to support our users. Thanks! |
I think this has been supported since https://github.com/commitizen-tools/commitizen/blob/master/CHANGELOG.md#v2290-2022-07-22. Could you please try with version higher than v2.29.0? I'll close this one for now. Feel free to reopen it if you think there's something missed |
@Lee-W I believe this might still be unsupported - especially if somebody wants to explicitly sign commits, and not have git configured for auto-signing. |
I'd like to add Tested manually in a clean Docker container using GPG local keys, and Git not configured for auto-signing : (I also have a physical Yubikey for hardware GPG but not testing it here, I might if facing a use case) # Create keys (defaults, with password)
gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long
# Signing key: sec .../BC48BD5325580A88 ...
# Signature key: ssb .../2785C6F3562417C5 ...
# Configure Git user
git config --global user.signingkey BC48BD5325580A88
git config --global --get user.signingkey
# Configure GPG
cat >>~/.gnupg/gpg.conf <<EOF
use-agent
pinentry-mode loopback
EOF
cat >>~/.gnupg/gpg-agent.conf <<EOF
allow-loopback-pinentry
EOF
# Configure hooks
export SKIP='no-commit-to-branch'
# Create Git commit with GPG (Enter passphrase: should ask for GPG passphrase)
git add -p ./...
git commit -S
# Validate signature (should show in blue under commit SHA)
git log --show-signature
# Create commitizen commit with GPG
git add -p ./...
cz c -- -S
# Validate signature (should show in blue under commit SHA)
git log --show-signature |
Description
Allow for the version tag and commit from a
cz bump
command to be signed using a GPG key.Possible Solution
Implementing a flag on
cz bump
that allows for the tag and commit to be signed by adding the-S
argument to the git client.Additional context
This is related to issue #248 but the fixes proposed to
cz c
there won't help if I also need to enforce tags and commits during a version bump being signed.The text was updated successfully, but these errors were encountered: