Bloc notes | Pinentry in Terminal via SSH connection


Posted on January 2, 2018 by Alex comments [ssh gpg git]

in .bashrc or .profile

export GPG_TTY=$(tty)
if [[ -n "$SSH_CONNECTION" ]] ;then
    export PINENTRY_USER_DATA="USE_CURSES=1"
fi

Source https://gpgtools.tenderapp.com/kb/faq/enter-passphrase-with-pinentry-in-terminal-via-ssh-connection

# no curses, only tty
echo "pinentry-program /home/alex/.nix-profile/bin/pinentry-tty" > $HOME/.gnupg/gpg-agent.conf
gpg-connect-agent reloadagent /bye