Bug in GPG for Windows - gpg: invalid key resource URL for keyrings

Harakiri harakiri_23 at yahoo.com
Tue Aug 30 13:00:17 CEST 2005

I have an asc file which includes a public and secret
key. Using this key i want to create a public and
secret keyring.

Under windows i use (this example works perfectly
under any *nix btw)

gpg --homedir c:\keys\tmp --batch --yes --verbose
--status-fd 2 --no-default-keyring --keyring
c:\keys\tmp\pubring.gpg --secret-keyring
c:\keys\tmp\secring.gpg --import c:\keys\mykey.asc

output :

gpg: invalid key resource URL
gpg: keyblock resource `(null)': general error
gpg: invalid key resource URL
gpg: keyblock resource `(null)': general error

(you can copy and paste this and verify it for
yourself - you dont even need to have these
directories or a key)

The only workaround currently is, to use the homedir
param together with the --keyring arguments - so i
remove the absolute path and use the following command

gpg --homedir c:\keys\tmp --batch --yes --verbose
--status-fd 2 --no-default-keyring --keyring
pubring.gpg --secret-keyring secring.gpg --import

It is not possible under windows to specify a complete
file path to a key ressource - the above workaround
does only work if the key rings are within the same
directory - what do you do if they would be on another
drive ?

BTW : I also replaced "\" with "/" to be sure but then
gpg would think it should add the homedir param so it
would be like c:\keys\tmp\c:\keys\tmp\pubring.gpg

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Gnupg-devel mailing list