{"thread":{"id":"65815","subject":"Bug: Git Bash appends GNUPGHOME variable to existing value, rather than replacing","startedAt":"2026-06-15T14:53:56Z","lastAt":"2026-06-15T14:53:56Z","messageCount":1,"participants":["will.flowers@gmail.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"545585","messageId":"CAGA=4btkTrxi2AL6mr_=dinhP-K8Y3afPpVEwyG_OqwpAUR=cg@mail.gmail.com","threadId":"65815","inReplyTo":null,"subject":"Bug: Git Bash appends GNUPGHOME variable to existing value, rather than replacing","fromName":"","fromEmail":"will.flowers@gmail.com","sentAt":"2026-06-15T14:53:17Z","receivedAt":"2026-06-15T14:53:56Z","isPatch":false,"body":"Hi,\n\nI came across a bug with Git Bash that I wanted to report. I'm using\nanother program in Windows that requires that I install GPG4Win so I\ncan use their GPG signing integration.\n\nThanks,\nWill Flowers\n\nBug Description: There is a configuration conflict between how the\nGNUPGHOME environment variable is used by GPG4Win and how Git Bash\nuses it. If I set GNUPGHOME as an environment variable, it is used\ncorrectly to set the home location for gpg commands by GPG4Win.\n\nThis is an example of the home directory that is used by GPG4Win:\n\nPS C:\\Users\\wiflow> gpg --version\ngpg (GnuPG) 2.5.20\nlibgcrypt 1.12.2\nCopyright (C) 2026 g10 Code GmbH\nLicense GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nHome: C:\\Users\\wiflow\\.gnupg\nSupported algorithms:\nPubkey: RSA, Kyber, ELG, DSA, ECDH, ECDSA, EDDSA\nCipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,\n        CAMELLIA128, CAMELLIA192, CAMELLIA256\nHash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224\nCompression: Uncompressed, ZIP, ZLIB, BZIP2\n\n===========================================\n\nHowever, in Git Bash the value of GNUPGHOME is appended to the\nexisting home value. This is an example of the output from Git Bash:\n$ gpg --version\ngpg (GnuPG) 2.4.9\nlibgcrypt 1.12.2-unknown\nCopyright (C) 2025 g10 Code GmbH\nLicense GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\nHome: /c/Users/wiflow/C:\\Users\\wiflow\\.gnupg\nSupported algorithms:\nPubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA\nCipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,\n        CAMELLIA128, CAMELLIA192, CAMELLIA256\nHash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224\nCompression: Uncompressed, ZIP, ZLIB, BZIP2\n\n==============================================\n\nSteps to reproduce:\n\n1. Install Git for Windows (Git Bash). Use default settings for\neverything, including the option to use some commands (but not all) in\nWindows terminals.\n2. Install GPG4Win with the default settings.\n3. Set the GNUPGHOME environment variable in Windows.\n4. In Powershell, enter the command gpg --version and view the results.\n5. In Git Bash, enter the command gpg --version and view the results.\n\nGit for Windows version: 2.54.0.windows.1\nOperating System: Windows 11 Enterprise, 26100.8390\n"}]}