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

Bug: Git Bash appends GNUPGHOME variable to existing value, rather than replacing

From
Wwill.flowers@gmail.com <will.flowers@gmail.com>
Date
Jun 15, 2026, 14:53 UTC
Message-ID
<CAGA=4btkTrxi2AL6mr_=dinhP-K8Y3afPpVEwyG_OqwpAUR=cg@mail.gmail.com>
Hi,

I came across a bug with Git Bash that I wanted to report. I'm using another program in Windows that requires that I install GPG4Win so I can use their GPG signing integration.

Thanks, Will Flowers

Bug Description: There is a configuration conflict between how the GNUPGHOME environment variable is used by GPG4Win and how Git Bash uses it. If I set GNUPGHOME as an environment variable, it is used correctly to set the home location for gpg commands by GPG4Win.

This is an example of the home directory that is used by GPG4Win:

PS C:\Users\wiflow> gpg --version gpg (GnuPG) 2.5.20 libgcrypt 1.12.2 Copyright (C) 2026 g10 Code GmbH License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Home: C:\Users\wiflow\.gnupg
Supported algorithms:
Pubkey: RSA, Kyber, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
===========================================

However, in Git Bash the value of GNUPGHOME is appended to the existing home value. This is an example of the output from Git Bash: $ gpg --version gpg (GnuPG) 2.4.9 libgcrypt 1.12.2-unknown Copyright (C) 2025 g10 Code GmbH License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Home: /c/Users/wiflow/C:\Users\wiflow\.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
==============================================
Steps to reproduce:
1. Install Git for Windows (Git Bash). Use default settings for
everything, including the option to use some commands (but not all) in
Windows terminals.
2. Install GPG4Win with the default settings.
3. Set the GNUPGHOME environment variable in Windows.
4. In Powershell, enter the command gpg --version and view the results.
5. In Git Bash, enter the command gpg --version and view the results.

Git for Windows version: 2.54.0.windows.1 Operating System: Windows 11 Enterprise, 26100.8390

Message 1 of 1 in “Bug: Git Bash appends GNUPGHOME variable to existing value, rather than replacing”
  1. will.flowers@gmail.comJun 15, 2026

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.