keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.89k stars 1.23k forks source link

Misleading error message with 'keybase login' #7177

Open linsam opened 7 years ago

linsam commented 7 years ago

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)

maxtaco commented 7 years ago

Cc: @zapu