[arch-general] fail to export gpg private key
I have successfully created a gpg key pair on one of my computer. I would like to use the same pair on another computer, so the need to export. Here are the commands: $ gpg --output tth_pub.gpg --armor --export KeyID Results in -rw-rw-r-- 1 poisonivy poisonivy 1.7K Jul 6 13:34 tth_pub.gpg Fine. Now with private one: $ gpg --output tth_sec.gpg --armor --export-secret-key KeyID gpg: WARNING: nothing exported I have the tth_sec.pgp but with size of zero. What do I wrong? gpg-agent is running : 67:poisoni+ 23911 1 0 13:41 ? 00:00:00 gpg-agent --homedir /home/poisonivy/.config/gnupg --use-standard-socket --daemon gpg.conf ------------- no-greeting homedir ~/.config/gnupg use-agent default-key 92AB63D5 charset utf-8 utf8-strings armor keyserver pgp.mit.edu keyserver-options auto-key-retrieve gpg-agent.conf --------------------- homedir ~/.config/gnupg allow-preset-passphrase Thank you for help. -- google.com/+arnaudgabourygabx
$ gpg --output tth_sec.gpg --armor --export-secret-key KeyID gpg: WARNING: nothing exported
I have the tth_sec.pgp but with size of zero.
What do I wrong?
Are you doing this via ssh? In that case gpg-agent/pinentry often cause problems. Try again with: $ GPG_TTY=$(tty) gpg --output tth_sec.gpg --armor --export-secret-key KeyID —byte
On Wed, Jul 6, 2016 at 2:36 PM, Jens Adam <jra@byte.cx> wrote:
$ gpg --output tth_sec.gpg --armor --export-secret-key KeyID gpg: WARNING: nothing exported
I have the tth_sec.pgp but with size of zero.
What do I wrong?
Are you doing this via ssh? In that case gpg-agent/pinentry often cause problems. Try again with:
$ GPG_TTY=$(tty) gpg --output tth_sec.gpg --armor --export-secret-key KeyID
NO ssh. I just found the reason when running $ gpg --list-secret-keys. The command returned empty! Permission was set to 600 for items inside the gnupg folder. Setting permission to 700 for sub directories fixed it. $ ls ...... -rw------- 1 poisonivy poisonivy 1.7K Jul 6 13:34 tth_pub.gpg -rw------- 1 poisonivy poisonivy 3.6K Jul 6 14:46 tth_sec.gpg
—byte
-- google.com/+arnaudgabourygabx
This may or may not be related, but a recent caused lots of permissions errors in my gnupg homedirs. Happened on three machines.
participants (3)
-
arnaud gaboury
-
Ben Oliver
-
Jens Adam