{"thread":{"id":"40023","subject":"[bug report] Signing your work: GnuPG signing failed (gpg version 2.1)","startedAt":"2015-08-05T20:35:45Z","lastAt":"2015-08-05T22:55:38Z","messageCount":2,"participants":["Hugo Roy","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"267538","messageId":"20150805203545.GD4325@xps","threadId":"40023","inReplyTo":null,"subject":"[bug report] Signing your work: GnuPG signing failed (gpg version 2.1)","fromName":"Hugo Roy","fromEmail":"hugo@fsfe.org","sentAt":"2015-08-05T20:35:45Z","receivedAt":"2015-08-05T20:35:45Z","isPatch":false,"sender":{"key":"hugo@fsfe.org","avatar":null},"body":"\nHello,\n\nI've tried to sign a commit following\nhttps://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work however,\nthis is what happened:\n\n    % git commit -a -S -m \"signed commit testing\"\n    gpg: échec de la signature : Opération annulée\n    gpg: signing failed: Opération annulée\n    error: gpg n'a pas pu signer les données\n    fatal: échec de l'écriture de l'objet commit\n\nsorry for the locale, \"annulée\" means cancelled and the last two\nlines mean:\n\n    error: gpg could not sign data\n    fatal: failure to write the commit object\n\nHowever, when I tried later, nothing specific happened and the commit\nwas done just as if I did not add the -S option:\n\n    % git commit -a -S -m \"signed commit test\"\n    [master 739cdd3] signed commit test\n    1 file changed, 5 deletions(-)\n\nCommit:\nhttps://github.com/hugoroy/.emacs.d/commit/b8e5b72def0c5fcc760c84d6ecd2b95b9727ae62\n\n\n\nI notice in the git-scm.com manual that they use GnuPG version 1. I\nuse GnuPG 2.1.6 with libgcrypt 1.6.3.\n\nLet me know if you need more information or any pointer to help me\ndebug this more in depth.\n\nthanks,\nHugo\n\n\n-- \nHugo Roy – Free Software Foundation Europe https://fsfe.org/about/roy\n \nPlease use cryptography for email: see https://emailselfdefense.fsf.org/en/\nMerci d’utiliser la cryptographie pour l’email : voir https://emailselfdefense.fsf.org/fr/\n"},{"id":"267551","messageId":"20150805225538.GE581651@vauxhall.crustytoothpaste.net","threadId":"40023","inReplyTo":"20150805203545.GD4325@xps","subject":"Re: [bug report] Signing your work: GnuPG signing failed (gpg version 2.1)","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2015-08-05T22:55:38Z","receivedAt":"2015-08-05T22:55:38Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Wed, Aug 05, 2015 at 10:35:45PM +0200, Hugo Roy wrote:\n> \n> Hello,\n> \n> I've tried to sign a commit following\n> https://git-scm.com/book/tr/v2/Git-Tools-Signing-Your-Work however,\n> this is what happened:\n> \n>     % git commit -a -S -m \"signed commit testing\"\n>     gpg: échec de la signature : Opération annulée\n>     gpg: signing failed: Opération annulée\n>     error: gpg n'a pas pu signer les données\n>     fatal: échec de l'écriture de l'objet commit\n> \n> sorry for the locale, \"annulée\" means cancelled and the last two\n> lines mean:\n> \n>     error: gpg could not sign data\n>     fatal: failure to write the commit object\n> \n> However, when I tried later, nothing specific happened and the commit\n> was done just as if I did not add the -S option:\n> \n>     % git commit -a -S -m \"signed commit test\"\n>     [master 739cdd3] signed commit test\n>     1 file changed, 5 deletions(-)\n> \n> Commit:\n> https://github.com/hugoroy/.emacs.d/commit/b8e5b72def0c5fcc760c84d6ecd2b95b9727ae62\n> \n> \n> \n> I notice in the git-scm.com manual that they use GnuPG version 1. I\n> use GnuPG 2.1.6 with libgcrypt 1.6.3.\n\nI believe this is a bug in GnuPG 2.1 or the relevant pinentry.  Debian\nbug #793016[0] describes my experience with it.  Killing the gpg-agent\nwhen this occurs and letting it respawn works for me.  I'm very certain\nthat this is not a bug in Git, though.\n\nGnuPG 2.1 provides the same command line interface as GnuPG 1, so it\nwill work the same way with git.  Failing to sign is a GnuPG problem,\nnot a Git problem.\n\n[0] https://bugs.debian.org/790316\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187\n"}]}