Skip to content
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

Support the commit --no-gpg-sign flag #589

merged 5 commits into from Aug 18, 2022


Copy link


Add the ability to send the --no-gpg-sign option to git. This is the default behavior in a "vanilla" git install, but if gpg signing is configured elsewhere (i.e. in ~/.gitconfig) then you can use this option to override and disable it for a particular commit.

Triggered by gpg_sign: false - see test and README updates.

Signed-off-by: Bradley Buda <>
Copy link

@bradleybuda I like this PR, but I request the following change:

Instead of passing gpg_sign as false, I think it would be more consistent with the rest of the API to pass no_gpg_sign. You can see examples of this for the following:

  • git commit --no-verify
  • git merge --no-commit
  • git merge --no-ff
  • git revert --no-edit

The design of the API mimics what you would pass on the command line. Like it or not, that is the design we have today.

Copy link

I have fixed the Ruby 2.7 windows-latest build in #591

Copy link
Contributor Author

Thanks for the comment @jcouball, updated the patch. I hadn't noticed that there were some other --no--prefixed flags already in the code so agree that this should be consistent.

Signed-off-by: Bradley Buda <>
Copy link

@jcouball jcouball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for the thorough tests!

@jcouball jcouball changed the title Add gpg_sign: false to send --no-gpg-sign to git Add support for the commit --no-gpg-sign flag Aug 18, 2022
@jcouball jcouball changed the title Add support for the commit --no-gpg-sign flag Support the commit --no-gpg-sign flag Aug 18, 2022
@jcouball jcouball merged commit e58cd29 into ruby-git:master Aug 18, 2022
@jcouball jcouball mentioned this pull request Aug 18, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants