GnuPG: “decryption failed: secret key not available”

I just tried importing GnuPG keys from one account to another on my system. After that I was unable to encrypt or decrypt any messages. Here is the error which was found to be bailing out:
GnuPG: “decryption failed: secret key not available”

It is resulted because I just imported only the public keys from backup. Private keys are very much essential in-case you want GPG keys to work for encrypting and decrypting messages.

To ensure private keys are also copied into your existing account, use –allow-secret-key-import option along with –import as shown below.
gpg –allow-secret-key-import –import

Once this is done, you will be able to smoothly encrypt and decrypt the messages just like earlier. While taking backups of GnuPG keys etc, you must keep this point in mind.
 
  • 28 Users Found This Useful
Was this answer helpful?

Related Articles

 How to setup two-factor authentication in UnelmaHost?

You can set up now Two-factor authentication in UnelmaHost.com for free. Two-Factor...

 I don't have my Two-Factor Authentication device with me

Should you need to login to the client area but don't have the device upon which you configured...

 I no longer have my Two-Factor device and/or backup code

On occasion you may no longer have the device upon which you configured two-factor authentication...

 Which app do I need for Two-Factor Authentication?

Our Two-Factor Authentication uses a system called 'Time Based Tokens'. There are many compatible...