Commit fails with GPG signing: inappropriate ioctl for device
The problem
When I try to make a commit with GPG signing the app shows a popup with the following error message:
gpg: signing failed: inappropriate ioctl for device
I made a research about this problem and tried switching the pinentry-program (in .gnupg/gpg-agent.conf) to some other and it produced the results below:
- /usr/bin/pinentry-curses ->
inappropriate ioctl for device - /usr/bin/pinentry-emacs ->
no pinentry - /usr/bin/pinentry-gnome3 ->
no pinentry - /usr/bin/pinentry-gtk-2 ->
inappropriate ioctl for device - /usr/bin/pinentry-qt ->
no pinentry - /usr/bin/pinentry-qt5 ->
no pinentry
While none of them are working from github desktop, all of them are working fine if I call them from a terminal with the test code below:
echo test | gpg --clear-sign
I'm using the latest KDE plasma desktop under Arch linux.
Release version
3.3.12-linux2 (x64)
Operating system
Arch linux
Steps to reproduce the behavior
No response
Log files
No response
Screenshots
No response
Additional context
No response
While none of them are working from github desktop, all of them are working fine if I call them from a terminal with the test code below:
This is an interesting note, and I wonder if the environment variables is missing things depending on how you launch the app (e.g. using the system launcher). Does the behaviour change if you launch github-desktop from the terminal and then try this?
I ask because inappropriate ioctl for device gave me a similar hit for GPG signing failing https://github.com/keybase/keybase-issues/issues/2798 which mentions tty and GPG_TTY, and I wonder what settings you have in your shell profile that might not be available elsewhere...
Okay, I tried the following:
- Open terminal
- Run
github-desktopand commit something -> not working:no pinentry/inappropriate ioctl for device - Run
echo test | gpg --clear-sign-> working fine: shows the pinentry popup window - Run
export GPG_TTY=$(tty) - Run
github-desktopand commit something -> not working:no pinentry/inappropriate ioctl for device - Run
echo test | gpg --clear-sign-> working fine: shows the pinentry popup window
So it seems that export GPG_TTY=$(tty) does not solve the problem for me.
Also it turns out that running the app from the same shell profile - as where the test code works fine - does not affects the app's behavior.