Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpg: signing failed: Inappropriate ioctl for device #2798

Open
dryvenn opened this Issue Feb 2, 2017 · 25 comments

Comments

Projects
None yet
@dryvenn
Copy link

dryvenn commented Feb 2, 2017

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)

source

@diego898

This comment has been minimized.

Copy link

diego898 commented Nov 1, 2017

I cannot tell you how grateful I am to you!

@cfig

This comment has been minimized.

Copy link

cfig commented Dec 8, 2017

@dryvenn You are a life saver! THX!

@dminca

This comment has been minimized.

Copy link

dminca commented Jan 31, 2018

You're a saviour! Helped me on Fedora.

@danduk82

This comment has been minimized.

Copy link

danduk82 commented Feb 7, 2018

really thanks a lot

@boltzjf

This comment has been minimized.

Copy link

boltzjf commented Feb 9, 2018

Wow, you are so cool, helped me a lot!

Thank you so so much!!!

@kenvac

This comment has been minimized.

Copy link

kenvac commented Feb 13, 2018

Thanks a tonne man!!. Helped me on debian 9.

@Turini

This comment has been minimized.

Copy link

Turini commented Mar 15, 2018

helped me a lot also! thank you

zanshin added a commit to zanshin/dotfiles that referenced this issue Mar 15, 2018

Adding GPG_TTY export to bashrc
GPG_TTY needs to be set to the value in tty ($(tty)) in order for GPG to
work properly with mutt. keybase/keybase-issues#2798
@TheOpenDevProject

This comment has been minimized.

Copy link

TheOpenDevProject commented Mar 24, 2018

Cheers!.

@tejasmob

This comment has been minimized.

Copy link

tejasmob commented May 1, 2018

You're truly rockstar man! 🥇
Thanks!

@ivy-dong

This comment has been minimized.

Copy link

ivy-dong commented May 4, 2018

Amazing
really thanks a lot

@abhi-jha

This comment has been minimized.

Copy link

abhi-jha commented May 4, 2018

Oh wow. And I was pulling my hair that my key has expired which it definitely didn't. I don't know why I was thinking its 2019 for some reason. Thank you.

@netsafe

This comment has been minimized.

Copy link

netsafe commented May 7, 2018

works inside a docker container Deian stretch both host and container

@bakhtin bakhtin referenced this issue May 15, 2018

Merged

GPG sign #1313

@chshawkn

This comment has been minimized.

Copy link

chshawkn commented Jun 11, 2018

Sadly, no tty on travis-ci or appveyor.
GPG 2.1.11 comes with ubuntu 16.04 throw out a invalid error if I add 'pinentry-mode loopback' into ~/.gnupg/gpg.conf.
Various versions of gpg wasted lot of my time and I think it is a piece of shit, they don't test it on different environments?

@jamesdbloom

This comment has been minimized.

Copy link

jamesdbloom commented Jun 20, 2018

This doesn't work for me because when I add that setting GPG doesn't sign some artefacts properly anymore.

@netsafe

This comment has been minimized.

Copy link

netsafe commented Jun 21, 2018

@chshawkn Travis-CI - in my opinion - is a very questionable CI solution... Call me classy, but I'm still using Jenkins and it never ever failed me regardless of the task and environment I used. With Windows slave all the problems were gone when I used WinSSHD - just write your scripts properly and have fun

@chshawkn

This comment has been minimized.

Copy link

chshawkn commented Jul 11, 2018

@netsafe Thanks for your advice. I use Gitlab CI/CD and Jenkins on private projects. Travis-CI is for public repositories.

I've solved the GPG issues on Gitlab CI/CD, Travis-CI and AppVeyor, one script works on all CI platforms.

see: https://github.com/ci-and-cd/maven-build/blob/develop/src/main/ci-script/lib_ci.sh#L702

acannon828 added a commit to acannon828/dotfiles that referenced this issue Sep 3, 2018

@rootVIII

This comment has been minimized.

Copy link

rootVIII commented Sep 17, 2018

worked for me on Ubuntu 18... thanks

@svenluijten

This comment has been minimized.

Copy link

svenluijten commented Oct 10, 2018

I cannot thank you enough! ❤️ Hours were lost debugging this 🙈

@maxtaco

This comment has been minimized.

Copy link
Contributor

maxtaco commented Oct 11, 2018

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 in bash, and the current command line seems to work in tcsh too. Looks like we need a flow here to: (1) have users select their shell; and (2) to give you the right command to setenv given the shell. I guess alternatively we can always run bash -c 'lots of commands | other commands', but we'd need another level of quoting.

@josefigueroa-nedap

This comment has been minimized.

Copy link

josefigueroa-nedap commented Oct 29, 2018

It also works on OSX using zsh. Thanks!

@dmjio

This comment has been minimized.

Copy link

dmjio commented Nov 25, 2018

@dryvenn nice, works on nixos.

@dadiyang

This comment has been minimized.

Copy link

dadiyang commented Dec 2, 2018

It works! Thank you so much!

@jamalkaksouri

This comment has been minimized.

Copy link

jamalkaksouri commented Feb 21, 2019

@dryvenn thank you, works on ubuntu subsystem.

zsh support

@teddybear

This comment has been minimized.

Copy link

teddybear commented Feb 26, 2019

Thank you!

@stevenchen3

This comment has been minimized.

Copy link

stevenchen3 commented Feb 27, 2019

Kudos!!!! This saves me a lot of time. Appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.