# Why does gpg.program work for commit but not log?

5 messages from 2014-06-18 to 2014-06-18. Participants: Jason Pyeron, Jeff King.
Thread: https://gitlist.dev/t/36943

## Jason Pyeron, 2014-06-18 04:18

Subject: Why does gpg.program work for commit but not log?
Message-ID: <ABACA8639E2A49BA8A1E602DBE815867@black>
URL: https://gitlist.dev/e/ABACA8639E2A49BA8A1E602DBE815867%40black

```
jpyeron@black /projects/microsoft-smartcard-sign/tmp
$ git --version
git version 1.7.9
jpyeron@black /projects/microsoft-smartcard-sign/tmp
$ GIT_TRACE=1 git commit -S -m 'bin'
trace: built-in: git 'commit' '-S' '-m' 'bin'
trace: run_command: '/projects/microsoft-smartcard-sign/tmp/bin/logginggpg.sh'
'-bsau' 'Jason Pyeron <jpyeron+test3@pdinc.us>'
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/documentation/faqs.html for more
information

You need a passphrase to unlock the secret key for
user: "Jason Pyeron <jpyeron+test3@pdinc.us>"
2048-bit RSA key, ID 54D0E8E4, created 2014-06-18

[master 38afa1f] bin
 1 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100755 bin/logginggpg.sh

jpyeron@black /projects/microsoft-smartcard-sign/tmp
$ GIT_TRACE=1 git log --show-signature
trace: built-in: git 'log' '--show-signature'
trace: run_command: 'less'
trace: exec: 'less'
trace: run_command: 'gpg' '--verify' '/tmp/.git_vtag_tmpNLFqtm' '-'
commit 38afa1f4d0c73fd47d5788310a1a2080aa0abbba
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/documentation/faqs.html for more
information
gpg: Signature made Wed, Jun 18, 2014  0:11:40 EDT using RSA key ID 54D0E8E4
gpg: Good signature from "Jason Pyeron <jpyeron+test3@pdinc.us>"
Author: Jason Pyeron <jpyeron+test3@pdinc.us>
Date:   Wed Jun 18 00:11:40 2014 -0400

    bin
trace: run_command: 'gpg' '--verify' '/tmp/.git_vtag_tmp41t6O6' '-'

commit 174d4544627883c4b03a9b888c2d2c127accefa5
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/documentation/faqs.html for more
information
gpg: Signature made Wed, Jun 18, 2014  0:08:39 EDT using RSA key ID 54D0E8E4
gpg: Good signature from "Jason Pyeron <jpyeron+test3@pdinc.us>"
Author: Jason Pyeron <jpyeron+test3@pdinc.us>
Date:   Wed Jun 18 00:08:39 2014 -0400

    loged signed commit
trace: run_command: 'gpg' '--verify' '/tmp/.git_vtag_tmpo6b0D3' '-'

commit 4f7ad8a8f38b06d675ac5196c80b1a26ecbee433
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/documentation/faqs.html for more
information
gpg: Signature made Tue, Jun 17, 2014 23:18:01 EDT using RSA key ID 54D0E8E4
gpg: Good signature from "Jason Pyeron <jpyeron+test3@pdinc.us>"
Author: Jason Pyeron <jpyeron+test3@pdinc.us>
Date:   Tue Jun 17 23:17:55 2014 -0400

    test signed commit

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

```

## Jeff King, 2014-06-18 07:36

Subject: Re: Why does gpg.program work for commit but not log?
Message-ID: <20140618073645.GA24769@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20140618073645.GA24769%40sigill.intra.peff.net
In-Reply-To: <ABACA8639E2A49BA8A1E602DBE815867@black>

```
On Wed, Jun 18, 2014 at 12:18:35AM -0400, Jason Pyeron wrote:

> jpyeron@black /projects/microsoft-smartcard-sign/tmp
> $ git --version
> git version 1.7.9

That's rather old. In the meantime we have:

	commit 6005dbb9bf21d10b209f7924e305bd04b9ab56d2
	Author: Jacob Sarvis <jsarvis@openspan.com>
	Date:   Wed Mar 27 10:13:39 2013 -0500
	
	    log: read gpg settings for signed commit verification
	    
	    "show --show-signature" and "log --show-signature" do not read the
	    gpg.program setting from git config, even though, commit signing,
	    tag signing, and tag verification honor it.

which is in v1.8.3.  In general, please double-check your problem
against a recent version of "master" when making a bug report.

-Peff

```

## Jason Pyeron, 2014-06-18 12:38

Subject: RE: Why does gpg.program work for commit but not log?
Message-ID: <9B9CF0F915BD4325BC92BBA1339B1B4E@black>
URL: https://gitlist.dev/e/9B9CF0F915BD4325BC92BBA1339B1B4E%40black
In-Reply-To: <20140618073645.GA24769@sigill.intra.peff.net>

```
> -----Original Message-----
> From: git-owner@vger.kernel.org 
> [mailto:git-owner@vger.kernel.org] On Behalf Of Jeff King
> Sent: Wednesday, June 18, 2014 3:37
> To: Jason Pyeron
> Cc: git@vger.kernel.org
> Subject: Re: Why does gpg.program work for commit but not log?
> 
> On Wed, Jun 18, 2014 at 12:18:35AM -0400, Jason Pyeron wrote:
> 
> > jpyeron@black /projects/microsoft-smartcard-sign/tmp
> > $ git --version
> > git version 1.7.9
> 
> That's rather old. In the meantime we have:
> 
> 	commit 6005dbb9bf21d10b209f7924e305bd04b9ab56d2
> 	Author: Jacob Sarvis <jsarvis@openspan.com>
> 	Date:   Wed Mar 27 10:13:39 2013 -0500
> 	
> 	    log: read gpg settings for signed commit verification
> 	    
> 	    "show --show-signature" and "log --show-signature" 
> do not read the
> 	    gpg.program setting from git config, even though, 
> commit signing,
> 	    tag signing, and tag verification honor it.
> 
> which is in v1.8.3.  In general, please double-check your problem
> against a recent version of "master" when making a bug report.
> 

I will (try to) compile master and test. This is the latest version in cygwin.

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 

```

## Jeff King, 2014-06-18 12:51

Subject: Re: Why does gpg.program work for commit but not log?
Message-ID: <20140618125116.GA7753@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20140618125116.GA7753%40sigill.intra.peff.net
In-Reply-To: <9B9CF0F915BD4325BC92BBA1339B1B4E@black>

```
On Wed, Jun 18, 2014 at 08:38:32AM -0400, Jason Pyeron wrote:

> > That's rather old. In the meantime we have:
> > 
> > 	commit 6005dbb9bf21d10b209f7924e305bd04b9ab56d2
> [...]
> 
> I will (try to) compile master and test. This is the latest version in cygwin.

To save you some trouble, I actually found that commit by reproducing
your problem on Linux and bisecting. So I'm fairly sure it will fix it
for you. :)

You may want to bug the cygwin packagers about updating their version of
git. v1.7.9 is two and a half years old, and since then we have many
bugfixes, including some which are specifically targeted at cygwin
(which can only lead me to assume a lot of people are building from
source on cygwin).

-Peff

```

## Jason Pyeron, 2014-06-18 17:12

Subject: RE: Why does gpg.program work for commit but not log?
Message-ID: <52E5FCA4AECC48EBB91476B2F789754C@black>
URL: https://gitlist.dev/e/52E5FCA4AECC48EBB91476B2F789754C%40black
In-Reply-To: <20140618073645.GA24769@sigill.intra.peff.net>

```


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 

> -----Original Message-----
> From: git-owner@vger.kernel.org 
> [mailto:git-owner@vger.kernel.org] On Behalf Of Jeff King
> Sent: Wednesday, June 18, 2014 3:37
> To: Jason Pyeron
> Cc: git@vger.kernel.org
> Subject: Re: Why does gpg.program work for commit but not log?
> 
> On Wed, Jun 18, 2014 at 12:18:35AM -0400, Jason Pyeron wrote:
> 
> > jpyeron@black /projects/microsoft-smartcard-sign/tmp
> > $ git --version
> > git version 1.7.9
> 
> That's rather old. In the meantime we have:
> 
> 	commit 6005dbb9bf21d10b209f7924e305bd04b9ab56d2
> 	Author: Jacob Sarvis <jsarvis@openspan.com>
> 	Date:   Wed Mar 27 10:13:39 2013 -0500
> 	
> 	    log: read gpg settings for signed commit verification
> 	    
> 	    "show --show-signature" and "log --show-signature" 
> do not read the
> 	    gpg.program setting from git config, even though, 
> commit signing,
> 	    tag signing, and tag verification honor it.
> 
> which is in v1.8.3.  In general, please double-check your problem
> against a recent version of "master" when making a bug report.

Ok, so now I will be using locally compiled git. 

jpyeron@black /projects/microsoft-smartcard-sign/tmp
$ /projects/git/local-build/bin/git --version
git version 1.8.4.21.g992c386

jpyeron@black /projects/microsoft-smartcard-sign/tmp
$ GIT_TRACE=1 /projects/git/local-build/bin/git log --show-signature
trace: built-in: git 'log' '--show-signature'
trace: run_command: 'less'
trace: exec: 'less'
trace: run_command: '/projects/microsoft-smartcard-sign/tmp/bin/logginggpg.sh'
'--status-fd=1' '--verify' '/tmp/.git_vtag_tmp66WxpM' '-'
commit 38afa1f4d0c73fd47d5788310a1a2080aa0abbba

```
