Unable to commit using git


I am using Atom 1.22.1 x64. I am trying to execute a commit function f but continue to receive an error “unable to commit”. “error: gpg failed to sign the data. fatal: failed to write commit object”.

I installed Atom on a new Mac laptop and it worked fine. I uninstalled and reinstalled on the iMac and it still fails.

I am at a loss and have researched multiple solutions to no avail!

Thanks for your help!


I strongly doubt that this is a problem with Atom. What happens when you try to use git commit from the Terminal?


It works perfectly fine.


Seems a permissions issue?


I don’t disagree but I am not sure where to start looking at this point… it works in Terminal so I assume it is some Atom permission…


This is not something that I can effectively troubleshoot since I don’t have expertise regarding using git on Mac, or gpg, but I like to think I’m decent at coming up with the right questions to ask, and in this case I think you need to find the answer to, “Under what circumstances would gpg fail to sign data from a git commit command issued by a third-party program?” I feel like the answer to that question would bring you most of the way to a resolution.


Totally agree, DS. I tried removing gpg and Atom, reinstalling both… no success. I checked the permissions on the .gnupg directory – all looked good and matched the MacBook. It is really frustrating because short of rebuilding the Mac, I don’t know how to fix the problem.


Can you share a screenshot of the error you get @JayDub72? I’m wondering if you running into a known/reported issue e.g. maybe:

Also you mentioned that you removed gpg - just to clarify, if you remove gpg do you have any trouble committing in Atom?


Here is a link to the other post I made where I first believed the problem to be tied to gitplus plugin.


@rsese - I also just tried removing gpg and committing with Atom. It still throws the unable to commit error.

Thanks again!


OK. I fixed the problem by uninstalling gpg, gpg-agent, pinentry-mac, deleting the .gnupg directory and reinstalling everything. I then followed the steps outlined in this gist:

Thanks everyone for your help!


Thanks for letting us know what resolved things for you, glad you have things sorted out :+1:

And thanks for referencing the issue you opened. sorry we didn’t follow up there. It does seem like it could be at least related to the issue I mentioned so I might consolidate the issues.