Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've forgot my GPG password. But I have a backup of private key. Can I restore my password from backup file of secret key ?

share|improve this question
If I understand your question correctly, you've forgotten the passphrase on your GPG private key. Is your backup an unencrypted copy of the private key? If so, yes you can. If it's encrypted using the same passphrase as you've forgotten now, it won't help you. – gertvdijk Mar 7 '13 at 14:04
@gertvdijk how can I know which key is used to encrypt it? I can remember that I did something like gpg -ao myprivate.key --export-secret-keys <key> to export secret key. – sorush-r Mar 7 '13 at 14:09
I think you misinterpreted my previous comment. There's a passphrase (as in, password) to encrypt a private key. – gertvdijk Mar 19 '13 at 20:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.