Public bug reported: I exported secret keys by gpg --export-secret-keys --export-options backup >file and later tried to restore it by gpg --homedir . --import --import-options restore file
but gpg just creates pubring.kbx, not secret keys are imported. To its output includes: gpg: key xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxx: error sending to agent: No such file or directory gpg: error building skey array: No such file or directory gpg: Total number processed: 1 gpg: imported: 1 gpg: secret keys read: 1 Is there a workaround? Wouldn't it be easier just to backup ~/.gnupg /private-keys-v1.d directory and copy it to "homedir", if needed? ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: gnupg 2.2.4-1ubuntu1.2 ProcVersionSignature: Ubuntu 4.15.0-72.81-generic 4.15.18 Uname: Linux 4.15.0-72-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.9 Architecture: amd64 CurrentDesktop: XFCE Date: Sun Dec 15 11:05:39 2019 InstallationDate: Installed on 2019-07-08 (159 days ago) InstallationMedia: Xubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210) SourcePackage: gnupg2 UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: gnupg2 (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1856445 Title: Cannot import secret keys To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1856445/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs