Skip to content

Instantly share code, notes, and snippets.

@repodevs
Created December 12, 2018 14:56
Show Gist options
  • Star 42 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save repodevs/a18c7bb42b2ab293155aca889d447f1b to your computer and use it in GitHub Desktop.
Save repodevs/a18c7bb42b2ab293155aca889d447f1b to your computer and use it in GitHub Desktop.
gpg: signing failed: Inappropriate ioctl for device macOS
❱ git config user.signingKey 38AF394C
❱ git config commit.gpgSign true
echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
export GPG_TTY=$(tty)
echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
test
-----BEGIN PGP SIGNATURE-----
XXXXXX SUCCESS XXXX
-----END PGP SIGNATURE-----
ref: https://github.com/keybase/keybase-issues/issues/2798
@benyou1969
Copy link

It really works and solves the problem thank you :)

@venura9
Copy link

venura9 commented Jul 23, 2019

Worked for me too - thanks heaps!

@margauxflores
Copy link

Thanks, this really cleared the problem out for me!

@Loner1024
Copy link

Loner1024 commented Dec 16, 2019

It is more convenient to add export GPG_TTY=$(tty) to.zshrc .
You can avoid repeating this step in the future

sudo vi ~/.zshrc

Thank you very much.

@dougnoel
Copy link

Very helpful. Solved the problem of not being able to publish to Maven Central when attempting to follow these instructions: https://dzone.com/articles/publish-your-artifacts-to-maven-central

@sweetscientist
Copy link

Works on Windows10 using Ubuntu as well

@brickzzhang
Copy link

Really works for me and thank you.

@Allan-Nava
Copy link

thanks dude

@xkdcc
Copy link

xkdcc commented Dec 6, 2020

It works! Many thanks!

@delprofundo
Copy link

muy bueno

@raphael-brand
Copy link

thank you, it also works on google cloud IDE

@irvadesigner
Copy link

Many thanks it works!

@aclarknexient
Copy link

This was exactly what I needed to solve an issue with moving to a new macbook. Thank you very much!!!

@sAws
Copy link

sAws commented Jul 15, 2021

Thanks

@NinoBass
Copy link

NinoBass commented Mar 7, 2022

Lmaoo, It worked!

but do I need to do this all the time?

Cos I have done this before😂

@aroraakshit
Copy link

thank you! spent a month not dealing with this.. finally it works now :)

@abedurftig
Copy link

Thanks!

@ZowieTao
Copy link

work, problem is tty?

@dnslin
Copy link

dnslin commented Feb 18, 2023

Unfortunately, it doesn't work on My Arch Linux

@FelipeLemosBellini
Copy link

THX S2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment