Environment variable GNUPGHOME with Windows + MSYS2
Ingo Klöcker
kloecker at kde.org
Thu Feb 27 19:41:58 CET 2025
On Donnerstag, 27. Februar 2025 16:32:29 Mitteleuropäische Normalzeit Thomas
Schweikle via Gnupg-users wrote:
> Hi!
>
> Within Windows gnupg uses "%APPDATA%\gnupg" for its keyring and
> configurations.
> MSYS2 gpg uses "/c/msys/home/%USERNAME%/.gnupg". Now I had the idea to set
> GNUPGHOME so both could work with the same directory:
>
> set GNUPGHOME=%APPDATA%\gnupg
>
> This worked for gnupg from the gnupg-package. It worked for Gpg4Win
> included gpg as well, but the MSYS included version gave
>
> gpg: keyblock resource
> '/c/Users/<user>/AppData/Roaming/gnupg/C:\\Users\\<user>\\AppData\\Roaming\\
> gnupg/pubring.kbx': No such file or directory
> gpg: Fatal:
> /c/Users/<user>/AppData/Roaming/gnupg/C:\\Users\\<user>\\AppData\\Roaming\\g
> nupg: directory does not exist!
>
> from an MSYS shell. Any idea how to overcome this problem?
I doubt that it helps but try
set GNUPGHOME=%APPDATA%/gnupg
i.e with a forward slash instead of a backslash. Or try
set GNUPGHOME=C:/Users/<user>/AppData/Roaming/gnupg
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20250227/8d58233d/attachment.sig>
More information about the Gnupg-users
mailing list