Commit failed error with GPG signing turned on
See original GitHub issueDescription
I recently started seeing this with the atom/github package as well. See that report for more details: https://github.com/atom/github/issues/737
When I try to make a commit I get an error message:
Commit failed - exit code 128 received, with output: 'error: cannot run gpg: No such file or directory
error: gpg failed to sign the data
fatal: failed to write commit object'
Version
GitHub Desktop version: 0.0.37
OS version: OS X El Capitan (10.11.6)
Steps to Reproduce
- Make a change to a file in a repository
- Type a commit message
- Click Commit button
- Error Message:
Expected behaviour: I expect the commit to succeed.
Actual behaviour: I get the above error message, changes remain in the Changes tab and are not committed.
Reproduces how often: 100%
Logs
I couldn’t find log files for Desktop beta. Are there any?
Additional Information
I have git configured to sign every commit:
$ git config --global --get commit.gpgsign
true
And my git version:
$ git --version
git version 2.12.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:11 (3 by maintainers)
Top Results From Across the Web
How to understand the `gpg failed to sign the data` problem in ...
It means that is not finding the key that was set. You would need to set up the GPG key in Git (again):....
Read more >gnupg - Git error - gpg failed to sign data - Stack Overflow
SSH doesn't have anything to do with signing commits. They are referring to turning off GPG commit signing, and depending on using SSH...
Read more >Git commit fails if GPG signing is enabled : IDEA-127802
To reproduce enable auto-signing of all commits in Git config file with: [commit] gpgsign = true. Now all commits fail with this error:...
Read more >Docs feedback: Signing commits with GPG `gpg failed to sign ...
The following error happens when you try to sign your commit from the terminal (tested on macOs Mojave, but could be the case...
Read more >Let the Git plugin to sign commits with gpg key within Visual ...
gpg : signing failed: No secret key. error: gpg failed to sign the data ... in this matter. Still when I have gpgsign...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In case it helps someone, the workaround I’m using for now is to disable gpg signing with a repository level git config.
From within the repo path where I want to disable automatic gpg signing:
I tried this out and it works !
git config --global commit.gpgsign false