GPGMail fails with Yubikey Neo: Inappropriate ioctl for device

mac_hd's Avatar


27 Jul, 2017 02:46 PM

Trying to sign or encrypt mail using GPGMail or Services menu options.


Unfortunately we can't handle the error at this point.

Should your problem persist, please contact us at with the following error description:

gpg: signing failed: Inappropriate ioctl for device gpg: signing failed: Inappropriate ioctl for device


gpg (GnuPG/MacGPG2) 2.1.21
libgcrypt 1.8.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /Users/user/.gnupg Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2


Darwin Macintosh.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

Key usage:

  • Master (2048) #
    • Sign (2048) >Yubikey
    • Encrypt (2048) >Yubikey
    • Auth (2048) >Yubikey

All cli based operations have no issues.

  1. 1 Posted by Mento on 02 Aug, 2017 10:42 AM

    Mento's Avatar


    Can you sign something using the command line?
    If this isn't possible: run export GPG_TTY=$(tty) and try again.
    Can you decrypt mails?

    Did you modify your shell environment or gpg.conf?

    Regards, Mento

  2. 2 Posted by mac_hd on 03 Aug, 2017 05:19 PM

     mac_hd 's Avatar

    Command line operations including signing were possible.

    The latest state of the issue is that:

    • I discovered an issue with pinenty. This was resolved by installing pinenty-mac and setting this in the gpg-agent.conf. Personally I would prefer to use the pinentry-curses in tty and pinentry-mac in I don't think that's possible however?
    • I discovered that having A E S subkeys on my Yubikey wasn't enough for and after replacing my S subkey with SE master all systems are working.
  3. Support Staff 3 Posted by Luke Le on 18 Aug, 2017 11:10 AM

    Luke Le's Avatar


    as to your first issue, we might have a solution for that:
    If you don't check for an SSH connection, you should always see the curses interface in Terminal

    the second issue is a curious one, and unfortunately I'm not sure what the difference between using it in GPGMail vs. Terminal might be.

    If you have different subkeys for your key, GPGMail might use the wrong (or not the one you'd like it to use)

  4. Steve closed this discussion on 16 Feb, 2018 10:58 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac