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

Re: git rev-list fails to verify ssh-signed commits (but git log works)

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 8, 2023, 17:00 UTC
Message-ID
<xmqqfsbgt7mn.fsf@gitster.g>
In-Reply-To
<Y+PGRaiTTaZ/DtlJ@work-laptop-max>
Max Gautier <max.gautier@redhat.com> writes:
> $ git rev-list @{u}..HEAD --format='%G? %H'
> commit 9497d347b048dbea7f527624f815f7926594c4bc
> error: gpg.ssh.allowedSignersFile needs to be configured and exist for ssh signature verification

"git rev-list" as a plumbing does not want to read in or be affected by unnecessary configuration variables, so it uses git_default_config() to read the barebones, unlike "git log" that uses git_log_config() that calls, among other things, git_gpg_config().

Untill "git rev-list" learns to inspect the --format string and checks necessary configuration on-demand (e.g. presence of "%G" signals the need to call git_gpg_config()), this is sort of expected, unfortunately.

Previous: Junio C Hamano
Message 20 of 20 in “git rev-list fails to verify ssh-signed commits (but git log works)”
  1. Max GautierFeb 8, 2023
  2. Jeff KingFeb 8, 2023
  3. Junio C HamanoFeb 8, 2023
  4. Junio C HamanoFeb 8, 2023
  5. gpg-interface: lazily initialize and read the configurationJunio C Hamano, Feb 8, 2023
  6. Ævar Arnfjörð BjarmasonFeb 9, 2023
  7. Junio C HamanoFeb 9, 2023
  8. Ævar Arnfjörð BjarmasonFeb 9, 2023
  9. Jeff KingFeb 9, 2023
  10. Junio C HamanoFeb 9, 2023
  11. gpg-interface: lazily initialize and read the configurationJunio C Hamano, Feb 9, 2023
  12. Jeff KingFeb 26, 2023
  13. Junio C HamanoFeb 27, 2023
  14. Ævar Arnfjörð BjarmasonMar 8, 2023
  15. Jeff KingMar 9, 2023
  16. Junio C HamanoMar 9, 2023
  17. Jeff KingMar 10, 2023
  18. Jeff KingFeb 9, 2023
  19. Junio C HamanoFeb 9, 2023
  20. Junio C HamanoFeb 8, 2023

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.