Open yveoch opened 7 years ago
Thank you!
Thanks so much, works a treat! Winner winner chicken dinner :D
+1 karma
Thank you so much! I have been trying to fix it for 3 hours
Worked on Microsoft Windows [Version 10.0.19041.173] with WSL 2 (Ubuntu 18.04), thanks a ton!
thank you!
Incredible, 2020, Jun 26 and this still the solution 😄
For the record, the problem I had was:
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
alternatively, for fish
set -g -x GPG_TTY (tty)
Adding my praise to the chorus here - thank you for this great solution.
OMG. This saved me. Thank you.
Thanks for this nice workaround !!!
Live Saver!!!
setting
export GPG_TTY=$(tty)
was half of the solution for me, the other half was
apt-get install pinentry-curses
so that gpg asks for the GPG key passphrase on the terminal (because on remote server via ssh)
<3 Thanks a lot! <3
There's this once nice workaround you can do, at least on Arch Linux, which is adding:
GPG_TTY=$(tty)
to the /etc/environment
file. This takes effect system-wide at startup.
Maybe we could close this issue ? No... ?
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen:
gpg: signing failed: Inappropriate ioctl for device
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
export GPG_TTY=$(tty)
Man you are great you are a life saver
I think you just saved me a week. Thank you! 🍻
Wow, can't believe how many thumbs this issue has. I had a half a mind to update the website to fill in
GPG_TTY=$(tty)
as suggested in this issue, but that only works inbash
, and the current command line seems to work intcsh
too. Looks like we need a flow here to: (1) have users select their shell; and (2) to give you the right command tosetenv
given the shell. I guess alternatively we can always runbash -c 'lots of commands | other commands'
, but we'd need another level of quoting.
In this stack overflow answer you can find out how to add the export GPG_TTY=$(tty)
to a .zshrc for zsh
https://unix.stackexchange.com/questions/608842/zshrc-export-gpg-tty-tty-says-not-a-tty
Thank you so much to the OP. This issue is a poster child for how user-hostile gnupg is.
Thanks a ton!
Thanks!
Thank you so much!
Just came across this error trying to import a backup of my private key, you're a life-saver!
Thank you man! You saved my day 👍
thanks
Thank you so much <3
You just saved my day, @yveoch
If you're using Powerlevel10k with zsh
, be sure the export GPG_TTY=$(tty)
line is above of the code that initialize Instant Prompt
:
~/.zshrc
export GPG_TTY=$(tty) # Must go before
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Everything else go under here...
https://unix.stackexchange.com/a/608921/507429 https://github.com/romkatv/powerlevel10k/#how-do-i-enable-instant-prompt
saved my time. thanks
Literally a godsend, thank you forever random github user
work for me! thanks!
Hi, for people finding this, you can see/read more about possible fixes, solutions, and problems, similar to this one, here: https://stackoverflow.com/questions/41052538/git-error-gpg-failed-to-sign-data
Hi, for people finding this, you can see/read more about possible fixes, solutions, and problems, similar to this one, here: https://stackoverflow.com/questions/41052538/git-error-gpg-failed-to-sign-data
thanks for the link. I ran into this issue using duplicity for backups. Enabling/Re-configuring pinentry loopback as mentioned in that thread solved my issue.
gpg: signing failed: Inappropriate ioctl for device
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
export GPG_TTY=$(tty)
This discussion thread is on the "inappropirate ioctl error", doesn't seem to be specific about Kdewallet in Chromium. In FreeBSD plasma environment there is an error while setting up gpg2 keys in chromium, which says Inappropriate ioctl error. May I try this fix export GPG_TTY=$(tty),
and am I to type this in the terminal or in a config file?
I also tried these commands following the link from Wemu's post and this is what the terminal said:
$ echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
$ gpg --version
gpg (GnuPG) 2.3.3
libgcrypt 1.9.4
Thank you.
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen:
gpg: signing failed: Inappropriate ioctl for device
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
export GPG_TTY=$(tty)
That should be the first thing written on the GPG page. You saved my ass on FreeBSD with git.
Found this through google, thank you for this link.
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen:
gpg: signing failed: Inappropriate ioctl for device
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
export GPG_TTY=$(tty)
Thanks a ton, it saved hours for me.
i say mega thx
T ha
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen:
gpg: signing failed: Inappropriate ioctl for device
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
export GPG_TTY=$(tty)
Thanks!
这是macOS的另一种解决方案****
brew install pinentry-mac echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf killall gpg-agent # now test if it is working echo "test" | gpg --clearsign
但是,@dryvenn 的原始解决方案只需粘贴
export GPG_TTY=$(tty)
在您的某个地方,.bashrc
或者.zshrc
是一个更简单的解决方案,并且也适用于 macOS。
mac path show which pinentry-mac ✅-> /opt/homebrew/bin/pinentry-mac ❌-> /usr/local/bin/pinentry-mac
If you're using Powerlevel10k with
zsh
, be sure theexport GPG_TTY=$(tty)
line is above of the code that initializeInstant Prompt
:~/.zshrc
export GPG_TTY=$(tty) # Must go before # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi # Everything else go under here...
https://unix.stackexchange.com/a/608921/507429 https://github.com/romkatv/powerlevel10k/#how-do-i-enable-instant-prompt
Great!!!~
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen:
gpg: signing failed: Inappropriate ioctl for device
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
export GPG_TTY=$(tty)
You are godlike. Thank you!
Thanks!!!
You have helped me with this solution in WSL 2
Just wanted to stop by and say hello. Clearly I am not the only one who hangs out in this thread.
What's up nerds?
imagine
@Skeeve more like «A Lb[ii$5Cƹ4iU0*Zp~oʰ_x%i
It's a beautiful thing when the top result is the fix.
Over six years later and this helped me out, thank you yveoch!
I found another way to sovle it.
~/.gnupg/gpg.conf
use-agent
pinentry-mode loopback
~/.gnupg/gpg-agent.conf
allow-loopback-pinentry
Resource: https://d.sb/2016/11/gpg-inappropriate-ioctl-for-device-errors
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen:
gpg: signing failed: Inappropriate ioctl for device
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
export GPG_TTY=$(tty)
cant express how grateful i am to encounter this post, thank you very much
When trying to use the bash+curl verifying method on a server, this cryptic error message might happen:
Since this is a fatal error and also quite difficult to debug, maybe the fix could be put somewhere (in the provided command line?):
source