keybase / client

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

After reinstall, operations fail with "No secret key available" #1463

Open mqp opened 8 years ago

mqp commented 8 years ago

I was getting started with Keybase on my Ubuntu laptop, and here's what I did:

Afterward, signing and other operations failed due to the error provided in the title. I saw https://github.com/keybase/client/issues/1411 and ran keybase pgp select --only-import to import my key again. That worked, and I can sign, encrypt, and decrypt messages. However, other operations still fail:

crescens:~$ keybase prove hackernews mquander
You already have a proof for mquander@hackernews; overwrite? [y/N] y
▶ ERROR No secret key available

crescens:~$ keybase deprovision

mquander, BE CAREFUL!  \('o')/

You are about to delete this device from your account, including its secret
keys. If you don't have any other devices, you'll lose access to your account
and all your data!

Also, the secret keyring you're about to delete contains PGP keys. To list them
or copy them, use `keybase pgp export`.

Proceed? (type 'YES' to confirm): YES
▶ INFO Revoking KIDs:
▶ INFO   01200798af7c953d8be52d1579cfc05e09e458aa31eeb76823eeef10c7e66e74b0d30a
▶ INFO   0121da1190f11b0a43310ff69f63758fb427e518cd6c612eda626997b296278c22730a
▶ ERROR No secret key available
maxtaco commented 8 years ago

I think I understand what happened.

Try this: keybase ctl stop

Then nuke your config directory again

Then try to login.

On Wednesday, December 2, 2015, Marshall Quander notifications@github.com wrote:

I was playing around with Keybase on my Ubuntu laptop, and here's what I did:

  • Briefly attempted to install the node client before I read it was deprecated; hit Ctrl-C halfway through.
  • Installed the Go client via the deb package (curl | sudo dpkg -i).
  • Attempted keybase login, but it failed with a permission error. I found that ~/.config/keybase was owned by root. chown -R mquander:mquander fixed it.
  • Made a few proofs.
  • In an attempt to reproduce the permissions problem, I uninstalled the package and deleted ~/.config/keybase. Then I reinstalled the package. (The permissions problem didn't reproduce -- it was owned by mquander this time) and did keybase login again. This time keybase login did not ask me to provision the device; it just took my keybase passphrase.

Afterward, signing and other operations failed due to the error provided in the title. I saw #1411 https://github.com/keybase/client/issues/1411 and ran keybase pgp select --only-import to import my key again. That worked, and I can sign messages. However, other operations still fail:

crescens:~$ keybase prove hackernews mquander You already have a proof for mquander@hackernews; overwrite? [y/N] y ▶ ERROR No secret key available

crescens:~$ keybase deprovision

mquander, BE CAREFUL! ('o')/

You are about to delete this device from your account, including its secret keys. If you don't have any other devices, you'll lose access to your account and all your data!

Also, the secret keyring you're about to delete contains PGP keys. To list them or copy them, use keybase pgp export.

Proceed? (type 'YES' to confirm): YES ▶ INFO Revoking KIDs: ▶ INFO 01200798af7c953d8be52d1579cfc05e09e458aa31eeb76823eeef10c7e66e74b0d30a ▶ INFO 0121da1190f11b0a43310ff69f63758fb427e518cd6c612eda626997b296278c22730a ▶ ERROR No secret key available

— Reply to this email directly or view it on GitHub https://github.com/keybase/client/issues/1463.

mqp commented 8 years ago

That fixed the problem. Thanks!

maxtaco commented 8 years ago

Sure thing!

What happened was you nuked your private key but the daemon was still running and didn't change its internal view of your provisioning status accordingly. That is arguably a bug but one that would only come up if you did something drastic like nuking your config directory.

So I instructed you to kill your daemon. It auto forks the next time you run a command, like login.

Glad I could help out!

On Wednesday, December 2, 2015, Marshall Quander notifications@github.com wrote:

That fixed the problem. Thanks!

— Reply to this email directly or view it on GitHub https://github.com/keybase/client/issues/1463#issuecomment-161499827.

mqp commented 8 years ago

Makes sense, I hadn't realized there was a daemon running at all -- I figured all of the local state was probably being stored in the config files.