GPG error when signing
gpgme gave error GPGME:11: Bad passphrase
Error
gpgme gave error GPGME:11: Bad passphrase
Details
Seems to be due some incorrect detecction of controlling tty, this affects many programs using gpg signing.
Solution
Upstream bug, on Debian there is an opened bug with not much info.
Workarround
This is a first try which not always worked:
export GPG_TTY=$(tty) gpg-agent --daemon --pinentry-program=/usr/bin/pinentry-curses --keep-tty bash
Another more weird way is temporarily unset the password on the key:
gpg --edit-key <KeyId> gpg> passwd (...old password...) (empty) (empty)