I am migrating machines I use for my backups. It uses GnuPG to encrypt/decrypt files. I moved my keys trying two different methods: exporting and copying the ~/.gnupg folder.
Both methods seem to work without issue. When I issue a gpg -k
command, the output is identical on the new machine as it is on the old one. However, when I try to decrypt a backup archive on the new machine, I get the following error:
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: setting pinentry mode 'loopback' failed: Not supported
gpg: encrypted with 2048-bit RSA key, ID B5A6D4C1, created 2012-08-01 "<MY NAME REMOVED>"
gpg: decryption failed: No secret key
===== End GnuPG log =====
I can clearly see that I have a key with that identifier:
gpg -k
output on the new machine:
/root/.gnupg/pubring.gpg
pub rsa2048/C87A9934 2012-08-01
uid [ultimate] <MY NAME REMOVED>
sub rsa2048/B5A6D4C1 2012-08-01
I am pretty sure I did something similar in the past without a hiccup, could anyone please help me figure out what the issue could be?
Old Machine:
- Linux 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux
- gpg (GnuPG) 2.0.26
- libgcrypt 1.6.2
New Machine:
- Linux 4.0.2-1-ARCH #1 SMP PREEMPT Thu May 7 06:47:54 CEST 2015 x86_64 GNU/Linux
- gpg (GnuPG) 2.1.3
- libgcrypt 1.6.3
UPDATE:
gpg -K
output:
sec rsa2048/C87A9934 2012-08-01
uid [ultimate] <NAME REMOVED>
ssb rsa2048/B5A6D4C1 2012-08-01