I know that GnuPG is all about security, thus it's not giving many chance of retrieve private keys (otherwise anyone could do it) but I've got a private key, and my own rev.asc file.

I had to reinstall my Ubuntu box (former Ubuntu Studio) and I have backup of /home and /etc.

Is it possible to recover my GnuPG key instead of revoke it and create another one?

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

By default, GPG stores everything under the .gnupg directory in your home directory. (Your encrypted private key should be in ~/.gnupg/secring.gpg).

Restoring the entire ~/.gnupg directory from your backup will do the trick.

link|improve this answer
Thanks! Sadly, something must have gone wrong, because I cannot find my ~/.gnupg directory in the backup...probably I lost it before (or during) the disaster that lead me to the reinstall. – dag729 Oct 21 '10 at 12:24
@dag729: just in case you don't know this - ls will consider files and folders starting with a dot to be invisible. Use ls -a to show everything in the backup of your home directory. – Wim Coenen Oct 21 '10 at 12:28
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.