Page MenuHome GnuPG

Agent fails to access private keys from path containing non-ascii characters on Windows
Closed, DuplicatePublic

Description

I am using the simple installer from gnupg.org on Windows 10.

I encountered this because my Windows user name contains a non-ascii character, so the default path gpg uses (%APPDATA%\gnupg) ends up containing it.

I created my keys in a separate (not could-synced) folder using GNUPGHOME, and verified it worked there, then copied them (including the private-keys-v1.d subfolder) to the default location and suddenly the private keys were gone.

Steps to reproduce without having a Windows user name containing non-ascii characters:

cd C:\test\Jorgen\gnupg
set GNUPGHOME=C:\test\Jorgen\gnupg
gpg --generate-key

works as expected, whereas if you replace the 'o' with 'ø'

cd C:\test\Jørgen\gnupg
set GNUPGHOME=C:\test\Jørgen\gnupg
gpg --generate-key

it fails with

gpg: agent_genkey failed: No such file or directory
Nøgleoprettelse mislykkedes: No such file or directory

and the folder does not contain the private-keys-v1.d subfolder.

Details

Version
2.2.23