Menu

Unable to export keys to file

2017-09-12
2017-09-14
  • Spittingcrows

    Spittingcrows - 2017-09-12

    Hello,
    I've just re-installed my operating system. I'm running Linux Mint 18.2 Cinnamon 64-bit as os. Thunderbird is 52.2.1 64-bit and enigmail is 1.9.8.2 with gpg2.

    While attempting to export my key-pair to load encryption abilities onto another device, I keep getting the following error message:

    Saving the keys failed

    Error - key extraction command failed
    /usr/bin/gpg2 --charset utf-8 --display-charset utf-8 --use-agent --batch --no-tty --status-fd 2 -a --export-secret-keys 0xalphanumerics
    gpg: starting migration from earlier GnuPG versions
    gpg: porting secret keys from '/home/name/.gnupg/secring.gpg' to gpg-agent
    gpg: can't open '/home/name/.gnupg/secring.gpg': Permission denied

    Any idears about how to address this?
    Thanks for your time.

     
  • Ludwig Hügelschäfer

    This one shows the problem:

    gpg: can't open '/home/name/.gnupg/secring.gpg': Permission denied
    

    This means that gpg has no access rights for the secret keyring. You have to fix this by correcting the permissions. On the command line, type this:

    chmod -R u+rw ~/.gnupg
    

    Afterwards gpg should be able to do the conversion. Just check this by listing the secret keys.

    gpg2 --list-secret-keys
    

    Enigmail should work now.

     
  • Spittingcrows

    Spittingcrows - 2017-09-14

    Thank you Ludwig, but among the messages, I get this:

    gpg: can't open '/home/name/.gnupg/secring.gpg': Permission denied
    And then goes on to show the public keys.

    Someone told me that uninstalling the version of Enigmail installed via the add-ons screen and then reinstalling from terminal would work, but I'm having trouble finding documentation on that method. Thoughts?

     
    • Patrick Brunschwig

      That won't make any difference.

       
  • Spittingcrows

    Spittingcrows - 2017-09-22

    After running the sudo chmod (no messge/output for that besides entering my password) and trying to show the keys i still get the same error message in terminal.

    Is there another approach I could take to changing the permissions?

     
  • Patrick Brunschwig

    You might also need to run:

    sudo chown -R your-user-id ~/.gnupg
    
     

Log in to post a comment.