GPG commit signoff on WSL
I am using Pycharm with my environment setup on WSL and I've been experiencing some issues while trying to setup GPG commit signing.
I get the following error while using Pycharm's built in commit tool :
error: gpg failed to sign the data
However, when using the command:
echo "test" | gpg --clearsign
to enter my gpg key password, Pycharm's commiting tool then works until I repoen Pycharm
My guess is that the Pinentry password prompt doesn't open properly (from the WSL), refusing my commit as the key password is not entered.
Any idea on how to avoir having me to enter the command each time I reopen Pycharm and only have the prompt asked on the first commit ?
请先登录再写评论。
Please try a workaround from this thread: https://youtrack.jetbrains.com/issue/IDEA-127802#focus=Comments-27-1866498.0-0
And please let me know if it helps.
Hello,
I tried what was suggested on the thread but it did not work.
However, I've managed to find this issue (which is the same problem WSL related but with Visual Studio) and one of the fixes proposed there worked (I haven't tried the others) which was :
1. Install gpg4win (on my windows distribution)
2. set this config in my
~/.gnupg/gpg-agent.conffile in WSL2 ubuntu (I had to create the file):3. restart the gpg-agent with
4. Reopen Pycharm+1, thank you @Tanguy-Morelle . Worked nicely on my PhpStorm.
Tanguy Morelle you're a savior. Thanks!