Volume XXII, number 280Wednesday, October 7, 2026Latest message 4 hours ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

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

1 messages between Jun 15, 2026 and Jun 15, 2026, from will.flowers@gmail.com.

Plain Markdown or JSON for tools and agents.

will.flowers@gmail.comJun 15, 2026, 14:53 UTC on lore
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

Back to recent threads

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