threads / discuss / 49430

GPG signing is bent on WIndows

Subject: GPG signing is bent on WIndows

## tl;dr

3 messages between Sep 26, 2018 and Nov 9, 2018.

replies: 2people: 3as markdown or json

Jeffrey Walton· Sep 26, 2018, 20:05 UTC · lore

Several weeks ago I updated to the latest Git for Windows (when prompted by the version check). At the time I noticed:

$ git commit -S -am "Fix unset MAKE variable in test scripts" gpg: signing failed: No pinentry gpg: signing failed: No pinentry error: gpg failed to sign the data fatal: failed to write commit object

I got to look at it today. On Windows:

$ cat ~/.gnupg/gpg-agent.conf pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac

Jeff
Tacitus Aedifex· Sep 26, 2018, 21:41 UTC · re: Jeffrey Walton · lore

Re: GPG signing is bent on WIndows

On Wed, Sep 26, 2018 at 04:05:02PM -0400, Jeffrey Walton wrote:
Show 5 quoted lines
>I got to look at it today. On Windows:
>
>$ cat ~/.gnupg/gpg-agent.conf
>pinentry-program
>/usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac

Do you have this app on your system? That path looks like one for a mac pinentry program and won't work on Windows. There are several tutorials on the web that explain how to get GPG working on windows. I suggest starting there. Get so that you can sign normal files from the command line on Windows and then try again.

//tæ
Johannes Schindelin· Nov 9, 2018, 12:31 UTC · re: Jeffrey Walton · lore

Re: GPG signing is bent on WIndows

Hi Jeff,
On Wed, 26 Sep 2018, Jeffrey Walton wrote:
Show 14 quoted lines
> Several weeks ago I updated to the latest Git for Windows (when
> prompted by the version check). At the time I noticed:
> 
> $ git commit -S -am "Fix unset MAKE variable in test scripts"
> gpg: signing failed: No pinentry
> gpg: signing failed: No pinentry
> error: gpg failed to sign the data
> fatal: failed to write commit object
> 
> I got to look at it today. On Windows:
> 
> $ cat ~/.gnupg/gpg-agent.conf
> pinentry-program
> /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac

Git for Windows is partially based off of MSYS2, which upgraded GPG from v1 to v2, and one of the consequences is that v2 handles interaction with the user differently.

My guess is that you copied your config from a Mac, and the path is simply incorrect. I would wager a bet that it starts working when you remove that line with the incorrect path, as the default should work plenty fine for you.

Ciao, Johannes

← back to recent threads