1

After I did fresh install of Ubuntu 15.10 I had to setup GPG encryption with Evolution again and it is not working properly (prior to fresh install it worked fine on Ubuntu 15.04

After I select Option > GPG encrypt I am getting this error:

Because "gpg: CEF41E5C: skipped: unusable public key gpg: [stdin]: encryption failed: unusable public key ", you may need to select different mail options.

How to fix this error? thanks in advance :)

Alex Jones
  • 7,830
  • 9
  • 54
  • 93
  • What does `gpg -K` print? – Jens Erat Oct 28 '15 at 14:41
  • @JensErat it prints this http://sprunge.us/FdaB – Alex Jones Oct 28 '15 at 15:54
  • This tells your private key _should_ be available. Some days ago there was another post with similar problems, but not necessarily a duplicate (although chances are high): http://askubuntu.com/questions/690548/gpg-agent-enigmail-stopped-working-after-upgrade-to-ubuntu-15-10 – Jens Erat Oct 28 '15 at 18:57
  • From GnuPG, and especially to Enigmail. `gpg -K` (or the long version `gpg --list-secret-keys`) prints the secret keys available in your key chain. – Jens Erat Oct 29 '15 at 08:39
  • @JensErat see my answer, dont forget to vote up :) – Alex Jones Oct 31 '15 at 04:32

1 Answers1

0

I found the solution by myself.

You have two keys, one is pub and other is sub

edward@computer:~$ gpg --edit-key CEF41E5C
gpg (GnuPG) 1.4.18; Copyright (C) 2014 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

pub  4096R/CEF41E5C  created: 2015-07-27  expires: never       usage: SC  
                     trust: full          validity: unknown
sub  4096R/BB84D566  created: 2015-07-27  expired: 2015-08-26  usage: E   
[ unknown] (1). edward torvalds (encrypt the world) <ltorvalds024@gmail.com>

as you can see my pub key is fine but sub key is expired
now select sub key

key 1

next

expire

then enter the time after which it should expire, I choose 0 which means never

save

Done! :-)

Alex Jones
  • 7,830
  • 9
  • 54
  • 93