Received:
gpg: signing failed: Inappropriate ioctl for device
To fix:
$ GPG_TTY=$(tty) $ export GPG_TTY
You will notice a popup after this and you'll be able to enter your passphrase properly.