git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Stable GnuPG interface, git should use GPGME

From
BRBernhard E. Reiter <bernhard.reiter@intevation.de>
Date
Mar 10, 2017, 10:00 UTC
Message-ID
<201703101100.15214.bernhard.reiter@intevation.de>
Dear Git-Devs,

git uses an pipe-and-exec approach to running a GnuPG binary as writen in the documentation [1]:

    gpg.program
           Use this custom program instead of "gpg" found on $PATH when making
           or verifying a PGP signature. The program must support the same
           command-line interface as GPG

please consider using libgpgme interfacing to GnuPG, because the gpg command-line interface is not considered an official API to GnuPG by the GnuPG-devs and thus potentially unstable.

== Details

I'm involved in GnuPG development. For most applications using libgpgme is the way what GnuPG-devs would recommend, also see

  https://wiki.gnupg.org/APIs .

GnuPG devs are making a good effort of trying to keep the command-line interface stable, though it is not for sure. Git is only using a small part of the interface, so the risk when keeping the current way is small. Still I believe git's stability and usability would profit when moving to libgpgme, especially with the coming move to GnuPG 2.2, better diagnosing messages and for cross-plattform usage.

== Usability problem with `gpg2` vs `gpg`

My use case today was signing and git by default found the `gpg` binary by default and the command failed. The reason is that I have `gpg2` installed and most applications use it right away. So git failed signing because the .gnupg configuration of the user was not ready for the old `gpg` which is still installed on Debian GNU/Linux for purposes of the operating system. If git would have used libgpgme, gpgme would have choosen the most uptodate version of `gpg` available (or configured) without me intervening via gpg.program. Now because of this problem you could adding a check for `gpg2` and fallback to `gpg`, but even better would be to move to libgpgme. >:)

Best Regards and thanks for maintaining Git as Free Software, Bernhard

== how to respond

ps: Please copy me on replies as I am not on git@vger.kernel.org. pps: I've copied gnupg-devel@ so they can see I've send this report, you don't have to.

[1] https://github.com/git/git/blob/3bc53220cb2dcf709f7a027a3f526befd021d858/Documentation/config.txt search for 'gpg.program'.

-- 
www.intevation.de/~bernhard (CEO)     +49 541 33 508 3-3
Intevation GmbH, Osnabrück, Germany; Amtsgericht Osnabrück, HRB 18998
Owned and run by Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
Next: Ævar Arnfjörð Bjarmason
Message 1 of 19 in “Stable GnuPG interface, git should use GPGME”
  1. Bernhard E. ReiterMar 10, 2017
  2. Ævar Arnfjörð BjarmasonMar 10, 2017
  3. Michael J GruberMar 13, 2017
  4. Bernhard E. ReiterMar 13, 2017
  5. Michael J GruberMar 14, 2017
  6. Bernhard E. ReiterMar 17, 2017
  7. Werner KochMar 22, 2017
  8. Peter LebbingMar 22, 2017
  9. Werner KochMar 23, 2017
  10. Bernhard E. ReiterMar 23, 2017
  11. Werner KochMar 23, 2017
  12. Bernhard ReiterMar 13, 2017
  13. Linus TorvaldsMar 10, 2017
  14. Theodore Ts'oMar 10, 2017
  15. Bernhard E. ReiterMar 13, 2017
  16. Jeff KingMar 13, 2017
  17. brian m. carlsonMar 11, 2017
  18. Bernhard E. ReiterMar 13, 2017
  19. Christian NeukirchenMar 13, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.