'keybase pgp select' hangs with TTY / subkey error messages
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 56
Description
Running under a plain shell (no tmux, no screen, etc), with gpg-agent running, the client hangs at this point:
$ keybase pgp select
# Algo Key Id Created UserId
= ==== ====== ======= ======
1 4096R 1535F82E8083A84A Chris Weyl <cweyl@alumni.drew.edu>, Chris Weyl <rsrchboy@cpan.org>, Chris Weyl <chris.weyl@gmail.com>, Chris Weyl <chris@chrisweyl.com>, Chris Weyl <chris@whitepointstarllc.com>, Chris Weyl <chris.weyl@wps.io>, Chris Weyl <chris.weyl@wps.io>, Chris Weyl <cweyl@alumni.drew.edu>
Choose a key: 1
▶ WARNING error getting TTY for GPG: No Context provided for this call
▶ WARNING Bad subkey: openpgp: invalid data: subkey signature invalid: openpgp: invalid signature: RSA verification failure
After selecting 1, here's what the output of the above command but with --debug shows:
2016-10-09T11:08:44.145230 ▶ [DEBU keybase log.go:30] 07a time> SigChainLoader.Load: rsrchboy: 355.953µs
2016-10-09T11:08:44.145342 ▶ [DEBU keybase log.go:30] 07b time> LoadSigChains: rsrchboy: 366.085µs
2016-10-09T11:08:44.145446 ▶ [DEBU keybase log.go:30] 07c + Store user rsrchboy
2016-10-09T11:08:44.145535 ▶ [DEBU keybase log.go:30] 07d + SigHints.Store() for uid=7bbb66f4d7809628dbc414469bbdc819
2016-10-09T11:08:44.145629 ▶ [DEBU keybase log.go:30] 07e | SigHints.Store() skipped; wasn't dirty
2016-10-09T11:08:44.145901 ▶ [DEBU keybase log.go:30] 07f - SigHints.Store() for uid=7bbb66f4d7809628dbc414469bbdc819 -> ok
2016-10-09T11:08:44.146021 ▶ [DEBU keybase log.go:30] 080 - Store for rsrchboy skipped; user wasn't dirty
2016-10-09T11:08:44.146130 ▶ [DEBU keybase log.go:30] 081 + HasActiveKey
2016-10-09T11:08:44.146402 ▶ [DEBU keybase log.go:30] 082 | Checking user's ComputedKeyFamily
2016-10-09T11:08:44.146677 ▶ [DEBU keybase log.go:30] 083 - HasActiveKey -> true
2016-10-09T11:08:44.146801 ▶ [DEBU keybase log.go:30] 084 + IdentityTable::populate
2016-10-09T11:08:44.146922 ▶ [DEBU keybase log.go:30] 085 - IdentityTable::populate -> ok
2016-10-09T11:08:44.147044 ▶ [DEBU keybase log.go:30] 086 + VerifySelfSig for user rsrchboy
2016-10-09T11:08:44.147170 ▶ [DEBU keybase log.go:30] 087 | Found self-signature for rsrchboy @uid=7bbb66f4d7809628dbc414469bbdc819, seq=8, link=0a0f5b495877086457f40e6388f2eb0045e9e546a999e3824b8001594afc27f2
2016-10-09T11:08:44.147285 ▶ [DEBU keybase log.go:30] 088 - VerifySelfSig via SigChain
2016-10-09T11:08:44.147427 ▶ [DEBU keybase log.go:30] 089 time> LoadUser: {Contextified:{g:0xc420160a00} UID: Name: PublicKeyOptional:true NoCacheResult:false Self:true ForceReload:false AllKeys:false LoginContext:<nil> AbortIfSigchainUnchanged:false ResolveBody:<nil>}: 306.392428ms
2016-10-09T11:08:44.147549 ▶ [DEBU keybase log.go:30] 08a | configured GPG w/ path: /usr/bin/gpg2
2016-10-09T11:08:44.147671 ▶ [DEBU keybase log.go:30] 08b | running Gpg: /usr/bin/gpg2 --no-tty --with-colons --fingerprint -K
1
2016-10-09T11:08:47.132331 ▶ [DEBU keybase log.go:30] 08c SelectKey result: {KeyID:1535F82E8083A84A DoSecretPush:false}
2016-10-09T11:08:47.133994 ▶ [WARN keybase log.go:34] 08d error getting TTY for GPG: No Context provided for this call
2016-10-09T11:08:47.134267 ▶ [DEBU keybase log.go:30] 08e GPG version:
gpg (GnuPG) 2.0.22
libgcrypt 1.5.3
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ?, ?
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
2016-10-09T11:08:47.134494 ▶ [DEBU keybase log.go:30] 08f | running Gpg: /usr/bin/gpg2 --no-tty --armor --export-secret-key 9db3b4d1339271690d89a91c1535f82e8083a84a
2016-10-09T11:08:47.148880 ▶ [WARN keybase log.go:34] 090 Bad subkey: openpgp: invalid data: subkey signature invalid: openpgp: invalid signature: RSA verification failure
2016-10-09T11:08:47.149165 ▶ [DEBU keybase log.go:30] 091 GPG version:
gpg (GnuPG) 2.0.22
libgcrypt 1.5.3
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ?, ?
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
2016-10-09T11:08:47.149412 ▶ [DEBU keybase log.go:30] 092 | running Gpg: /usr/bin/gpg2 --no-tty --armor --export 9db3b4d1339271690d89a91c1535f82e8083a84a
2016-10-09T11:08:47.161597 ▶ [DEBU keybase log.go:30] 093 SecretUI:GetPassphrase, sessionID = 0
...and there we stay, until I abort it.
Additionally, --gpg-options doesn't actually appear to impact the options given to gpg2 (AFAICT, at any rate).
Am I futzing something here?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce keybase pgp select in a plain shell with gpg-agent running, then inspect the GPG invocation shown in the debug output and the handling of --gpg-options. Trace the path after key selection through TTY handling, secret-key export, and SecretUI:GetPassphrase; done means the command does not hang and the requested GPG options are applied.
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