how do i Import my private keys from the "private-keys-v1.d" folder

Is there a way to import my private keys from the “private-keys-v1.d” folder.
cause i deleted my old key and restored it with a backup software. i tried to copy the secret key files to the folder and then import the public key from the site i had saved it. But my old key wont appear in the key manager.

And how to keep keystores for gpg-1.x and gpg-2.x in sync?

no its one and the same version. i just want to recover my old key with the keyfiles from the “private-keys-v1.d” folder.

you know what i mean?

The way you describe it is the correct way to restore it. It is strange that it won’t show up.

Brainstorming what the cause could be:

Maybe a permission problem on the folder?
Is it the correct folder?
Maybe try with a fresh %APPDATA%\gnupg folder and then copy the keyfiles in the directory that is created?

If you run “gpg --with-keygrip -k foo@bar. baz” (with foo@bar.baz as a placeholder for your own key) you will be shown the “keygrip”. keygrip is the identifier for the secret parts for this public key and corresponds to the filenames in the private-keys.v1 folder. This way you can check if the public key matches the private key.

Hope this helps, but if someone would have asked me how to restore I would have said: Copy the private key files and import the public key.

Andre

My private-keys-v1.d folder from my last installation contains two files, both with a long string of characters for a name and .key as the extension. Hos do I recover my old keys from these?
I have saved the whole gpg folder in %APPDATA% and I am hoping I can recover my old private key.

Can anyone help?

Hi Bryan,

the first post already says:
Copy the files in the new directory (of the new installation) and then also import your public key from a different source.

(If this does not work, please start a new discussion topic, because it maybe a different problem.)

Regards,
Bernhard