2

I use Keybase and I want to export my private PGP key, but I don't know where it is.

Encryption and decryption with keybase pgp [encrypt|decrypt] works as expected with messages sent to and from other people, but neither keybase nor gpg know where my private key is:

$ keybase pgp push-private --all
ERROR No secret key found for fingerprint
$ keybase pgp pull-private --all
ERROR .keys doesn't exist
$ gpg --list-secret-keys
(no output)

Given this information, how can I determine where my private key is and export it? I'm using macOS.

John Blackbourn
  • 791
  • 1
  • 8
  • 14
  • I think the default created key is not available for download. I dropped the default, created a new key with `keybase pgp gen`, which was available for local. Then I wanted to `push-private` to be able to use it in other devices, and that fails for me. Therefore I ended up googling and here. :) – CKK May 31 '19 at 13:34

1 Answers1

1

Had the same problem and found the answer here: https://daniellemarco.nl/wp/2019/04/19/pretty-good-privacy-with-keybase-io/

The steps:

Make sure that in the linked device to your keybase.io account the option “Forbid account changes from the website” is disabled in the advanced settings. By disabling this option more possibles are enabled on the keybase.io site. One of them is to export your private key.

After you have disabled this option on your device, go to the website of keybase.io and visit your profile page. And find an “edit” link behind the signature of the public key. Select the edit link and you get the option to export your private key. Save it in a file and then you can then import it with:

gpg2 --allow-secret-key-import --import PrivateKeyFile

Also save your public key to a file. And import this one with the following command.

gpg2 --import PublicKeyFile

This will replace the generation of a PGP key pair with GnuPG and import your keybase.io key pair. At the end you should trust your key.

gpg2 --edit-key KeyId

and then trust and save.

mrks.diehl
  • 71
  • 6
  • Thanks for the answer! Unfortunately this solution doesn't work for me though because I chose not to store my private key on keybase.io. – John Blackbourn Jun 08 '19 at 16:26