[git-remote-gcrypt] gpg: signing failed: Inappropriate ioctl for device
Sean Whitton
spwhitton at spwhitton.name
Thu Oct 8 00:45:02 BST 2020
Hello,
On Wed 07 Oct 2020 at 01:15pm +03, Callum Macdonald wrote:
> On macOS, with gpg installed, I got the following error:
>
> gpg: signing failed: Inappropriate ioctl for device
> gpg: [stdin]: sign+encrypt failed: Inappropriate ioctl for device
>
> By finding this[1] I was able to solve it via:
> export GPG_TTY=$(tty)
>
> It looks to me as though here[2] the environment variable $GPG_AGENT_INFO is being checked, and if null, then the --no-tty flag is added to the gpg command. In my system, this variable is empty.
>
> gpg (GnuPG) 2.2.15
> libgcrypt 1.8.4
>
> Perhaps the error is in my setup. Usually I'd post an issue to the repo in the hopes that this might save somebody else finding the same problem in the future. Posting this here in the hopes of achieving the same result.
>
> CM.
>
> [1] https://github.com/keybase/keybase-issues/issues/1712
> [2] https://git.spwhitton.name/git-remote-gcrypt/tree/git-remote-gcrypt#n386
This sort of gpg stuff tends to be pretty fiddly. A patch would be
welcome to fix this for other macOS users, if you can write a commit
message which explains just what the environment variables should be set
to and why.
--
Sean Whitton
More information about the sgo-software-discuss
mailing list