Misleading error message with 'keybase login'
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 56
Description
I provisioned my keybase account manually using gpg from the command line. As such, when I tried to login using the client the first time, it wanted me to shell out to gpg or import my secret key from gpg. I chose to shell out (my private key is generally on a hardware token). After naming my device, I received the following error:
▶ ERROR Could not open key: no valid primary key self-signature or key(s) have expired (error 905)
I verified that I could in fact create signatures with the key in use, then ran strace on the keybase CLI program and observed it calling GPG successfully, but later the cli read from the keybase daemon "}\224\1\3\204\244code\315\3\211\244desc\331NCould not open key: no valid primary key self-signature or key(s) have expired\246fields\300\244name\255KEY_CORRUPTED\300" shortly before printing out the above error.
After some more poking around and getting nowhere, I remembered that I usually use a short expiration period on my keys and periodically update them, but I probably forgot to push the change to keybase. The version on the keybase server had expired, not my local or PGP keyserver pool version which had more recent signatures. Updating my pgp public key using the keybase.io website allowed me to finally create the device key and login via comandline successfully.
To help others who encounter this, I suggest updating the error to read something like this:
ERROR Could not open key (on keybase server): no valid primary key self-signature or key(s) have expired. The keybase copy of the public key might be out of date; try updating your key at https://keybase.io/ (error 905)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the keybase CLI login flow and the daemon response for error 905, which the report observed while reading the server-side public key. Trace where the KEY_CORRUPTED message is turned into the displayed error. Done means the error identifies an outdated keybase-server copy and points users to update their key at keybase.io.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, cryptography, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100