keybase / keybase/keybase-issues

Inappropriate ioctl for device

Open
#1,712 34 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
899
Forks
40
PR merge metrics
No merged PRs in 30d

Description

I'm getting the following error when trying to decrypt using keybase. Please let me know what debugging logs/steps you need.

❯ echo "foo" | keybase encrypt mike | keybase decrypt
warn: [GNUPG:] ENC_TO 8F5A1E88E78559A3 1 0
warn: [GNUPG:] PINENTRY_LAUNCHED 31254
warn: gpg: encrypted with 4096-bit RSA key, ID 8F5A1E88E78559A3, created 2014-02-19
warn:       "keybase.io/mike <mike@keybase.io>"
warn: gpg: public key decryption failed: Inappropriate ioctl for device
warn: [GNUPG:] ERROR pkdecrypt_failed 83918950
warn: [GNUPG:] BEGIN_DECRYPTION
warn: [GNUPG:] DECRYPTION_FAILED
warn: gpg: decryption failed: No secret key
warn: [GNUPG:] END_DECRYPTION
error: `gpg` exited with code 2

~
❯ echo "foo" | keybase encrypt mike | gpg -d

You need a passphrase to unlock the secret key for
user: "keybase.io/mike <mike@keybase.io>"
4096-bit RSA key, ID E78559A3, created 2014-02-19 (main key ID 5E57FEBF)

gpg: encrypted with 4096-bit RSA key, ID E78559A3, created 2014-02-19
      "keybase.io/mike <mike@keybase.io>"
foo
❯ keybase version
keybase (keybase.io CLI) v0.8.15
- node.js v0.10.25
- gpg (GnuPG) 2.1.5
- libgcrypt 1.6.3
Identifies as: 'keybase.io node.js client v0.8.15 linux'
❯ gpg -h
gpg (GnuPG) 1.4.19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown keybase encrypt mike | keybase decrypt pipeline with the reported Keybase, Node.js, and GnuPG versions, then compare it with gpg -d, which succeeds. Trace the CLI's decryption and passphrase handling using the requested debugging logs; done means the Keybase pipeline decrypts foo without the ioctl or decryption errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, node.js
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.