keybase / keybase/keybase-issues

key generation error: failed to insert into database (error 501)

Open
#3,974 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
899
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm trying to select a secundary key to my keybase account but it seems to be not working.

```
❯ keybase pgp select --multi
You are selecting a PGP key from your local GnuPG keychain, and
will publish a statement signed with this key to make it part of
your Keybase.io identity.

Note that GnuPG will prompt you to perform this signature.

You can also import the secret key to *local*, *encrypted* Keybase
keyring, enabling decryption and signing with the Keybase client.
To do that, use "--import" flag.

Learn more: keybase pgp help select

# Algo Key Id Created UserId
= ==== ====== ======= ======
1 256E 7EAF005216301681 <...>
Choose a key: 1
▶ ERROR key generation error: failed to insert into database (error 501)
```

### Infos:
The secret key is controlled by a Trezor T device, so this could be related to it, since it's the first time I'm trying it.

```
❯ keybase --version
keybase version 5.5.2
```
```
❯ gpg --version

gpg (GnuPG) 2.2.23
libgcrypt 1.8.7
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/perin/.gnupg/trezor
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
```
```
❯ gpg -K
/home/perin/.gnupg/trezor/pubring.kbx
-------------------------------------
sec nistp256 1970-01-01 [SC]
E3D5767E1F437CF9CBD1063E7EAF005216301681
uid [ultimate] <...>
ssb nistp256 1970-01-01 [E]
```
```
❯ keybase log send

------------
Success! Your log ID is:

523e697694a6ddf6137c9e1c
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `keybase pgp select --multi` entry point and reproduce the database error using the reported GnuPG 2.2.23 and Trezor-backed key setup. Compare the failing path with the successful `keybase log send` output and determine what must change so secondary-key selection completes without error 501.

Written by the indexing model from the issue text.

Assessment

Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.