You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit failed error with GPG signing turned on #1391
I recently started seeing this with the atom/github package as well. See that report for more details: atom/github#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
Reacted by Toru Nagashima, Mike Guida, Didier Baquier, Anastasios Papalyras, Samuel Carlsson, Nekzuris and AkshayMD007
@bwestover thanks for the report - #78 has been opened but not prioritized yet.
I'm not sure whether there's some quick wins for us to support existing setups - I gather gpg is on your PATH, but I suspect there's more work we need to do here.
I gather gpg is on your PATH, but I suspect there's more work we need to do here.
Yes, and I have a gpg-agent working with my stored passphrase. It works on the command-line without any intervention and all my commits are signed.
$ git commit -m "A test commit"
You need a passphrase to unlock the secret key for
user: "Brett Westover <[email protected]>"
4096-bit RSA key, ID 6D34F71F, created 2016-03-24
[test-branch d9bbc5bbe8] A test commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test
As you can see, there is a gpg step in that commit, but it doesn't require any intervention from me.
I'm suspicious that a recent update to dugite might be at fault. I got a similar error in the atom/github package, which I understand uses that package as well?
The error there was:
exited with code 128
stderr: error: gpg failed to sign the data
fatal: failed to write commit object'
It came on suddenly without any other changes to my local environment, but it was after installing an update which contained a bump of the dugite package.
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
Reacted by Veck Hsiao, Jamie Barton, Yish, Stefan Natter, jfernandocarlos, Nanda Kumar, Gideon Rosales, zenoe, Alexis Phanor, Adlaran and 41 more
Reacted by Jamal Kaksouri (B E T R I A), Nekzuris, Misael Taveras, Doug Ayers, Mohsen, Saravanan Selvamohan, Lenny Critchley and George Norris
Reacted by Junayed M Chowdhury, Ahmad Ajmi, Brian Aguirre, Edmond Chhung, ROVAST, Frankie Achille, elirandavid, Karol Wyliziński, Sujit Nachan, ASullet and 5 more
Reacted by Brook der Blätter, Marco Aceti, Konstantin Melnikov, Coco WJ, Tim Siwula, Felipe Mica, Roman Stepanchuk, 围墙, Michael Flores, Scc and 8 more
Reacted by Junayed M Chowdhury, Ahmad Ajmi, Brian Aguirre, Edmond Chhung, Frankie Achille, Juzer Shakir, Sujit Nachan, ASullet, Ramil Mamedov, João Aquino and 5 more
I don't know if this applies here or not, but my issue in the atom/github package (atom/github#737) was resolved in atom/github#765 by ensuring that the PATH variable made it to the shell out strategy.
Since the error I get in TNG is the same, maybe a similar solution could apply here?
Reacted by Amory Meltzer, Marc Hershey, Misael Taveras, Tony Delattre, Morgan Bauer, Doug Ayers, jacob, Adam McDonald, Saravanan Selvamohan, Lenny Critchley and 10 more
^ Unfortunately, that's not what most of us are after. We want to sign our commits, and that is just turning it off. If you're not worried about it, then yes, use that command to disabled commit signing.
Reacted by Matthew Benedict, Martin Bertsche, Felix Maaß, Saihajpreet Singh, Morgan Bauer, ERoots, Doug Ayers, Matheus Gonçalves, jacob, Steve Phillips and 15 more
Activity
shiftkey commentedon May 6, 2017
@bwestover thanks for the report - #78 has been opened but not prioritized yet.
I'm not sure whether there's some quick wins for us to support existing setups - I gather
gpgis on your PATH, but I suspect there's more work we need to do here.bwestover commentedon May 6, 2017
Yes, and I have a gpg-agent working with my stored passphrase. It works on the command-line without any intervention and all my commits are signed.
As you can see, there is a gpg step in that commit, but it doesn't require any intervention from me.
I'm suspicious that a recent update to
dugitemight be at fault. I got a similar error in the atom/github package, which I understand uses that package as well?The error there was:
It came on suddenly without any other changes to my local environment, but it was after installing an update which contained a bump of the
dugitepackage.bwestover commentedon 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:
bwestover commentedon May 10, 2017
I don't know if this applies here or not, but my issue in the
atom/githubpackage (atom/github#737) was resolved in atom/github#765 by ensuring that thePATHvariable made it to the shell out strategy.Since the error I get in TNG is the same, maybe a similar solution could apply here?
joshaber commentedon May 10, 2017
Yup, it seems very likely that's the problem here too 👍 Thanks for the heads up!
mysticatea commentedon May 17, 2017
I have encountered this problem, too.
The previous official GitHub Desktop for Windows (https://windows.github.com/) is working well.
Version
GitHub Desktop version: 0.5.3
OS version: Windows 7 pro
Pass git the shell environment.
EtherTyper commentedon May 17, 2017
@bwestover That is the problem! 😃 I used the same fix in #1578, and now GPG signing works.
joshaber commentedon May 26, 2017
I'm gonna roll this into #1796 so that we can track the underlying cause.
HajarElkoumikhi commentedon Mar 18, 2019
I tried this out and it works !
git config --global commit.gpgsign falsemarchershey commentedon Dec 12, 2019
^ Unfortunately, that's not what most of us are after. We want to sign our commits, and that is just turning it off. If you're not worried about it, then yes, use that command to disabled commit signing.
rcnsh commentedon Jun 9, 2020
Any update on this? I have the same error and apart from turning of commit signing, there's not much I can do.