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

[BUG] gpg.program: '~' not expanded to home directory

From
RMRoss MacArthur <ross@macarthur.io>
Date
Jul 11, 2025, 15:04 UTC
Message-ID
<CAF1X4d7N1xdZt9JkVZytbEU1=7q3X_F_nqm4EG82B8-cVa7g8Q@mail.gmail.com>

`gpg.program` treats a leading ‘~’ literally, unlike other path options such as `core.excludesfile`.

Error:
    fatal: cannot exec '~/.local/bin/mygpg': No such file or directory
Reproducer:
    ln -s "$(command -v gpg)" ~/.local/bin/mygpg
    git config gpg.program '~/.local/bin/mygpg'
    git commit -S -m "test"   # fails as above
Expected: Git should expand ‘~’ to $HOME.
Work-around: have to use an absolute path
Next: Jonas Brandstötter
Message 1 of 15 in “[BUG] gpg.program: '~' not expanded to home directory”
  1. Ross MacArthurJul 11, 2025
  2. gpg-interface: expand gpg.program as a pathJonas Brandstötter, Jul 11, 2025
  3. Junio C HamanoJul 14, 2025
  4. 0/2 gpg-interface: expand gpg.program as a pathJonas Brandstötter, Jul 22, 2025
  5. Junio C HamanoJul 22, 2025
  6. 1/2 gpg-interface: expand gpg.program as a pathJonas Brandstötter, Jul 22, 2025
  7. 2/2 t7510: add test cases for non-absolute gpg programJonas Brandstötter, Jul 22, 2025
  8. Jeff KingJul 25, 2025
  9. Jeff KingJul 25, 2025
  10. Junio C HamanoJul 29, 2025
  11. Jeff KingJul 29, 2025
  12. Junio C HamanoJul 29, 2025
  13. Junio C HamanoJul 12, 2025
  14. Andreas SchwabJul 12, 2025
  15. Junio C HamanoJul 12, 2025

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.