GPG signing failure

已回答

I have had GPG signing of my commits operational for quite a while, but with the update to 2024.3.1 I am now having issues. My GPG key does not have a passphrase and I'm now being prompted to enter one before it tries to commit.  If I hit enter (no passphrase) it generates this error message:

error: gpg failed to sign the data
fatal: failed to write commit object

Manually executing the git command in a shell (found in the git console tab) succeeds, as expected, and the commit IS signed.

0

Looks like 2024.3.1.1 prevents this from happening, but if you ran into it you need to follow the steps in https://youtrack.jetbrains.com/issue/IJPL-173525/Git-GPG-signing-fails-with-errors-like-Bad-CA-certificate-or-failed-to-write-commit-object to fix it.

 

0

…and that stopped working.  I've tried reverting to 2024.3.1 but I now have to use commandline or other tools to commit due to the GPG issues

0

Hi James,

How did it stop working? What is the error you get? 

Can you commit from the terminal inside the IDE? 

 

0

Hi,
I had the same problem and solved it, I am writing for those who read this task with the same problem;

The problem is that when signing a commit with GPG, Pycharm can't manage the step where GPG asks for a password. God knows when they will fix the bug...

Here is a workaround, install a program called pinentry that autofills this step and send a commit once from the terminal;
https://formulae.brew.sh/formula/pinentry-mac

you can then make a GPG signed commit via the VCS UI.

0

请先登录再写评论。