# GPG signing is bent on WIndows

3 messages from 2018-09-26 to 2018-11-09. Participants: Jeffrey Walton, Tacitus Aedifex, Johannes Schindelin.
Thread: https://gitlist.dev/t/49430

## Jeffrey Walton, 2018-09-26 20:05

Subject: GPG signing is bent on WIndows
Message-ID: <CAH8yC8ngjy_NGhgepRu+331L_=QQ4bpvMe5T4OtjLXJR3OZ-NQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAH8yC8ngjy_NGhgepRu%2B331L_%3DQQ4bpvMe5T4OtjLXJR3OZ-NQ%40mail.gmail.com

```
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, 2018-09-26 21:41

Subject: Re: GPG signing is bent on WIndows
Message-ID: <20180926214118.GA14431@SDF.ORG>
URL: https://gitlist.dev/e/20180926214118.GA14431%40SDF.ORG
In-Reply-To: <CAH8yC8ngjy_NGhgepRu+331L_=QQ4bpvMe5T4OtjLXJR3OZ-NQ@mail.gmail.com>

```
On Wed, Sep 26, 2018 at 04:05:02PM -0400, Jeffrey Walton wrote:
>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, 2018-11-09 12:31

Subject: Re: GPG signing is bent on WIndows
Message-ID: <nycvar.QRO.7.76.6.1811091328350.39@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1811091328350.39%40tvgsbejvaqbjf.bet
In-Reply-To: <CAH8yC8ngjy_NGhgepRu+331L_=QQ4bpvMe5T4OtjLXJR3OZ-NQ@mail.gmail.com>

```
Hi Jeff,

On Wed, 26 Sep 2018, Jeffrey Walton wrote:

> 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

```
