git-plus
git-plus copied to clipboard
git commit fails - error: gpg failed to sign the data
Is this a question or a feature request? If so please start the title with [QUESTION] or [REQUEST].
Are you on a windows machine and do you have trouble pushing to remote repositories? Check out this thread first because it probably has the solution and answers.
Are you having problems using submodules in atom with this package? Check out this thread.
Are you running MacOs 10.12 Sierra and having issues pulling/pushing? Check out this comment.
Did you update the package and you are seeing this message Failed to load the git-plus package? Run apm install from the package's directory and restart atom.
I am unable to commit my staged changes. I type in a message for the commit and receive an error message "Unable to commit. error: gpg failed to sign the data fatal: failed to write commit object"
I am able to execute a git commit -m "blah blah" command via terminal and it works perfectly (it prompts me for my passphrase and the commits the changes). I am never prompted for my passphrase from Atom. I have already made sure that my username and email are in the .gitconfig file as well set the helper to osxkeychain. I have also made sure that the username and password are in the keychain for github.
Thanks!
Steps to reproduce:
- Open Atom // project with files from github
- Toggle Git tab to be visible
- Modify file(s)
- Promote file to staged changes
- Enter commit message and click Commit

Update: Installed this on a fresh Mac and did NOT have the problem. I was prompted for the username and passphrase the first time I tried to commit. Worked flawlessly after that. No clue why it won't work on the original Mac. I will try clean uninstall and rebuild.
Removing and reinstalling did not fix the problem. I removed the .atom directory as well when I did a fresh install.
This is a git configuration problem
You probably have the option commit.gpgsign=true in your git config, which requires every commit to be signed with a GPG key, and don't have a propperly configured GPG key for signing commits
You can check which level of the git configurations has this option enabled:
git config --local -l
git config --global -l
git config --system -l
When you find where it is:
git config --[local|global|system] --unset commit.gpgSign
This will help you to get rid of it
git config --global commit.gpgsign false
This is what worked for me
git config --global commit.gpgsign false