Cannot import secret keys

Bug #1856445 reported by Jarno Suni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnupg2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

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)

Revision history for this message
Jarno Suni (jarnos) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.