gpg not able to find my secret key
Martin T
m4rtntns at gmail.com
Thu Aug 23 12:07:17 CEST 2018
On Thu, Aug 23, 2018 at 12:54 PM Martin T <m4rtntns at gmail.com> wrote:
>
> Hi!
>
> I reinstalled my workstation and moved ~/.gnupg directory from old
> machine to new one. Gpg version in both workstations is 2.1.18. The
> problem is, that in the new workstation, when I try to decrypt a file,
> it doesn't find the secret key:
>
> $ gpg -o .file -d .file.gpg
> gpg: encrypted with RSA key, ID 7BA1DFF9E00DF644
> gpg: decryption failed: No secret key
> $
>
> When I list the secret keys(gpg --list-secret-keys), then the output
> is empty. When I start the "gpg --list-secret-keys" with "strace -e
> open", then ~/.gnupg/secring.gpg file is not searched. gpg-agent is
> not running. When I start the gpg-agent, then it does't change
> anything, i.e the "gpg --list-secret-keys" is empty.
> Directory and file permissions for ~/.gnupg are the same as in old
> installation. I also started both gpg and gpg-agent with
> "--debug-level guru" option, but it provided no useful information.
> For example:
>
> $ gpg --debug-level guru --list-secret-keys
> gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache
> memstat trust hashing ipc clock lookup extprog
> gpg: DBG: [not enabled in the source] start
> gpg: DBG: [not enabled in the source] keydb_new
> gpg: DBG: [not enabled in the source] keydb_search_reset
> gpg: DBG: keydb_search: reset (hd=0x000055e6f13ce8b0)
> gpg: DBG: [not enabled in the source] keydb_search enter
> gpg: DBG: keydb_search: 1 search descriptions:
> gpg: DBG: keydb_search 0: FIRST
> gpg: DBG: keydb_search: searching keybox (resource 0 of 1)
> gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => EOF
> gpg: DBG: [not enabled in the source] keydb_search leave (not found)
> gpg: DBG: [not enabled in the source] stop
> gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
> outmix=0 getlvl1=0/0 getlvl2=0/0
> gpg: secmem usage: 0/65536 bytes in 0 blocks
> $
>
> What might cause this?
>
>
> thanks,
> Martin
I forgot to add, that "gpg-connect-agent 'keyinfo --list' /bye" prints
four(if I remember correctly, then I had two keys) keys:
$ gpg-connect-agent 'keyinfo --list' /bye
S KEYINFO D1FB0DC2361FC6826CE6CB6EAB4D36DA6E254FFA D - - - P - - -
S KEYINFO EF4529B5ED613C1F849849C1025805114A13B946 D - - - P - - -
S KEYINFO 6B1903F77C2C0F502EC28F484F5BD9FCB4A3F3EB D - - - P - - -
S KEYINFO DE9D9A4362E8E4D8AA64B85149939F8A711B2CE0 D - - - P - - -
OK
$
Maybe it is a communication issue between the gpg and gpg-agent?
However, I would expect the gpg to report it if this is the case.
thanks,
Martin
More information about the Gnupg-users
mailing list