Skip to content

Advise on using `gpg agent` as an alternative `ssh agent`

sheeviZi edited this page Aug 11, 2022 · 2 revisions

Advise for users of gpg-agent as an alternative ssh-agent

If you have a setup where gpg-agent with pinentry-ncurses is your ssh keys manager for ssh and git (see gpg-agent/SSH_agent); Then make sure to have ssh always update the tty where gpg-agent reads input from by adding the following line to your ssh config file ~/.ssh/config

Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"

For reference: Configure pinentry to use the correct TTY .

This will prevent pinentry-ncurses from corrupting your tty session every time you cd into a git repository that uses ssh.