`keybase pgp import` hangs
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 56
Description
Running Fedora 30 x86_64, Keybase doesn't seem able to import a private key. I've tried both of the following with the same result:
- `gpg --export-secret-keys FB298ABBE1D00A1C8FA4DC1FA8B51F5E8032CCE4 | keybase pgp import --push-secret`
- `gpg -o key.gpg --export-secret-keys FB298ABBE1D00A1C8FA4DC1FA8B51F5E8032CCE4; keybase pgp import --infile key.gpg --push-secret`
On the CLI, it looks like it's just hung up. The logs show a much different story, there it looks like `keybase` is asking for `pinentry` to ask for my passphrase. When I export my secret key `gpg` invokes `/usr/bin/pinentry` and that works fine. My full log ID is 4ff29fbaafc00c59ce6d621c, but this snippet from `Keybase.app.log` shows invoking `pinentry`. Nothing ever pops up though.
```
["Info","2019-07-27T14:39:38.750Z","Asked for password"]
["Action","2019-07-27T14:35:56.832Z","type: engine-gen:keybase1SecretUiGetPassphrase: {\"type\":\"engine-gen:keybase1SecretUiGetPassphrase\"}"]
["Action","2019-07-27T14:35:56.832Z","type: pinentry:newPinentry: {\"type\":\"pinentry:newPinentry\"}"]
["Action","2019-07-27T14:35:56.833Z","type: pinentry:replaceEntity: {\"type\":\"pinentry:replaceEntity\"}"]
["Action","2019-07-27T14:39:38.750Z","type: engine-gen:keybase1SecretUiGetPassphrase: {\"type\":\"engine-gen:keybase1SecretUiGetPassphrase\"}"]
["Action","2019-07-27T14:39:38.751Z","type: pinentry:newPinentry: {\"type\":\"pinentry:newPinentry\"}"]
["Action","2019-07-27T14:39:38.751Z","type: pinentry:replaceEntity: {\"type\":\"pinentry:replaceEntity\"}"]
```
I'm not sure if it's somehow related, but if I try to upload my secret key using the web interface it complains the private and public keys don't match, even if I use the key ID reported by keybase to export the key. I made a quick check with a new `GPGHOME` and `gpg` happily imports them and sees them as the same keypair.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the two `keybase pgp import --push-secret` commands on Fedora and tracing the `keybase1SecretUiGetPassphrase` and `pinentry` log events shown in the report. Done means the CLI completes the import and accepts the matching private and public keys without hanging or requiring an unavailable prompt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, cryptography
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100