threads / discuss / 36943

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

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

## tl;dr

5 messages between Jun 18, 2014 and Jun 18, 2014.

replies: 4people: 2as markdown or json

Jason Pyeron· Jun 18, 2014, 04:18 UTC · lore

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· Jun 18, 2014, 07:36 UTC · re: Jason Pyeron · lore

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.

-Peff
Jason Pyeron· Jun 18, 2014, 12:38 UTC · re: Jeff King · lore

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

Show 31 quoted lines
> -----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· Jun 18, 2014, 12:51 UTC · re: Jason Pyeron · lore

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

On Wed, Jun 18, 2014 at 08:38:32AM -0400, Jason Pyeron wrote:
Show 6 quoted lines
> > 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· Jun 18, 2014, 17:12 UTC · re: Jeff King · lore

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

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- 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.
 
Show 30 quoted lines
> -----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

← back to recent threads