keybase / keybase/keybase-issues

Python GNUPG "sign+encrypt failed: Inappropriate ioctl for device" Within Docker Container

Open
#4,038 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
899
Forks
40
PR merge metrics
No merged PRs in 30d

Description

I can encrypt files perfectly fine when specifying a passphrase, but for some reason when I don't specify a passphrase, python-gnupg returns with:

`gpg: signing failed: Inappropriate ioctl for device`

I use a docker container for encrypting and decrypting.

I came across this Github issue (https://github.com/keybase/keybase-issues/issues/2798), which suggests to run:

`export GPG_TTY=$(tty)`

I've added this to my Dockerfile, but I'm still running into the same issue:

`RUN export GPG_TTY=$(tty)`

I couldn't find anything related to --no-tty in the docs (https://gnupg.readthedocs.io/en/latest/).

Any help with this would be appreciated!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the sign-and-encrypt failure in the Docker container using python-gnupg, comparing runs with and without a passphrase. Read the linked GPG_TTY guidance, the Dockerfile command, and the python-gnupg documentation around --no-tty. Done means identifying a documented, reproducible configuration or a confirmed library issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.