GPG error when pulling private keys
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 56
Description
Log ID: `7548994cf9b8a1e7ddeccb1c`
```
$ keybase pgp pull-private --all
PLEASE READ THIS CAREFULLY -- PRIVATE KEYS ARE AT STAKE!
This command will import PGP private keys from KBFS
(found in .keys/pgp), and export them to the local GnuPG keychain. They might have been
put there via keybase pgp push-private. After this
operation, these keys will be available for local GnuPG operations.
Really pull your PGP private key from KBFS? (type 'YES' to confirm): YES
▶ ERROR GPG error: exit status 2
```
I can import my keys using `gpg --import keybase/private/user/.keys/pgp/key.asc`.
The logs don't show anything regarding GPG, but the keys are imported as usual when GPG is in batch mode (modifying `gpg.conf`). But I can't have batch mode enabled 100% of the time, and I can't find any way to customize GPG flags.
Adding the `--batch` flag (line 174) apparently solves the issue - I'm currently using a patched version to make it work :/
https://github.com/keybase/client/blob/29bfd9d39f6a403eb1142d228b0b8a5cc7b149af/go/libkb/gpg_cli.go#L171-L176
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at go/libkb/gpg_cli.go around lines 171-176 and reproduce the keybase pgp pull-private --all command with GnuPG batch mode disabled. Confirm that pulling the private key from KBFS completes successfully and imports it into the local GnuPG keychain without requiring a persistent gpg.conf change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cryptography
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100