Re-using *-ownertrust-gpg.key, *-public-gpg.key and *-secret-gpg.key files

I am a very recent user of PGP, GnuPG and Gpg4win.

I created and published a key in another (Windows) computer, and backed up the *-ownertrust-gpg.key, *-public-gpg.key and *-secret-gpg.key files, imagining that that would be enough to reuse it in a new computer or installation (perhaps I was mistaken, and this is one of my questions).

I actually don’t remember for sure that the previous computer was using Gpg4win, but I think that is likely.

Now I am at a new computer with Gpg4win, and have placed those files under \gnupg in my Windows user home directory. However they keys do not seem to be recognized. This is what I get:

GPG Passphrase: **********
*gpg: WARNING: “–no-use-agent” is an obsolete option - it has no effect
gpg: no default secret key: No secret key
gpg: signing failed: No secret key

(I am using this to sign Mavan artifacts, so Gpg4win is being run by Maven.)

So my questions are the following: will I be able to reuse these keys if I have only those files and, if so, how can I do it?

Thanks,

Rodrigo

\gnupg in your user directory is not the gnupg home directory on Windows. (It’s %APPDATA%\gnupg )
But besides this it is not enough to place your exported keys in the gnupg home directory. You have to Import them. You can do this on the command line or with a GUI like Kleopatra or GPA.

You should be able to find some howto’s if you search for something like “export / import secret key gnupg”

Great, thanks! Got things to work again.