question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Commit failed error with GPG signing turned on

See original GitHub issue

Description

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

  1. Make a change to a file in a repository
  2. Type a commit message
  3. Click Commit button
  4. Error Message: image

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:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

108reactions
bwestovercommented, May 6, 2017

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:

$ git config commit.gpgsign false
26reactions
HajarElkoumikhicommented, Mar 18, 2019

I tried this out and it works !

git config --global commit.gpgsign false

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found