Skip to content

gnupg2 successfully generated identity with onlykey-agent but left an error output keydb_search failed #44

@ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4

Description

cmd:

onlykey-gpg init example@example.io --verbose

opt:

gpg: keydb_search failed: End of file
gpg: error reading key: End of file
Traceback (most recent call last):
  File "/home/system/.local/bin/onlykey-gpg", line 8, in <module>
    sys.exit(gpg_tool())
             ~~~~~~~~^^
  File "/home/system/.local/bin/onlykey_agent.py", line 6, in <lambda>
    gpg_tool = lambda: libagent.gpg.main(DeviceType)
                       ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/home/system/.local/lib/python3.13/site-packages/libagent/gpg/__init__.py", line 392, in main
    return args.func(device_type=device_type, args=args)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/system/.local/lib/python3.13/site-packages/libagent/gpg/__init__.py", line 226, in run_init
    check_call(keyring.gpg_command(['--homedir', homedir,
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                    '--list-secret-keys', args.user_id]))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/system/.local/lib/python3.13/site-packages/libagent/gpg/__init__.py", line 114, in check_call
    subprocess.check_call(args=args, stdin=stdin, env=env)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 419, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/gpg', '--homedir', '/home/system/.gnupg/onlykey', '--list-secret-keys', 'example@example.io']' returned non-zero exit status 2.

related issues:

gpg2 version 2.4.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions