Did I lose my GPG data?

1

I copied my GPG data from another computer by just copying ~/.gnupg/* to an external drive.

I can't quite figure out where this leaves me. I'd read that this works, but can't figure out how to get it set up again. GPG won't list any keys.

I didn't do --export and --import because I figured this saved me a couple steps (and, again, had read that it would work).

user517952

Posted 2015-11-05T18:10:03.227

Reputation: 11

Answers

1

GnuPG does not scan all your drives and folders for its home directory, but looks for it as dedicated places, by default only ~/.gnupg (in other words, in your home directory).

If you want to use it on another computer, use the --homedir option, for example gpg --homedir=/media/usb/.gnupg --list-keys. If you copied your GnuPG home directory back on another computer, you might have to take ownership again using chown $USER:$USER ~/.gnupg, as even when using the same user name, the underlying numeric IDs might have changed. Also, if you only copied the GnuPG home directory's contents (~/.gnupg/* does that), you'll have to apply proper permissions (chmod 700 ~/.gnupg) to the enclosing directory, GnuPG is rather picky on others being able to read your files.

Jens Erat

Posted 2015-11-05T18:10:03.227

Reputation: 14 141

Did all of that. I took a screenshot of my actions and the apparent results. http://i.imgur.com/nxkQRj5.png

– user517952 – 2015-11-05T21:44:09.357

1Both your public and secret keyring are empty (look at the file size). Are they also empty on your thumb drive? – Jens Erat – 2015-11-05T21:56:39.937

Yes, yes they are.

It's lost. – user517952 – 2015-11-06T00:53:07.153