Pinentry fails with gpg-agent and SSH
Well, this worked for me:
export GPG_TTY=`tty`
add this to your .bashrc
or just kick it before using gpg.
I've found the answer on the GPG Website itself. The agent was failing to find on which screen to display the Pinentry window. I just had to put the following in my .*shrc
file:
echo "UPDATESTARTUPTTY" | gpg-connect-agent > /dev/null 2>&1