GTK pinentry with gpg-agent as ssh-agent

Chris Coutinho chrisbcoutinho at
Tue Mar 2 13:33:38 CET 2021

On Tue, 2021-03-02 at 10:35 +0000, Romain Lebrun Thauront via Gnupg-users wrote:
> Hi folks,
> I start using my gpg key as my ssh key and I configure gpg-agent to manage my
> ssh keys as mention in the arch wiki
> article.
> The problem is, it work well but my gpg-agent is now "link" to the last
> terminal I opened, and I do not have the GTK's
> Pinentry prompt.
> It's very annoying as I use a lot of terminal, and some graphic software like
> thunderbird will not trigger the GTK
> prompt to unlock my GPG key anymore. (Therefore hanging indefinitely in the
> hope to receive access to my GPG private
> key, which they never acceed as I do not have any prompt to unlock it)
> I actually trigger a dummy unlocking of my GPG key on the last terminal I have
> open every time I know an application is
> going to need access to the key. (which is really annoying)
> So, is there a way to have BOTH gpg-agent managing ssh, and GTK pinentry
> prompts for unlocking keys ?
> If not, is there a way to export/convert a gpg private key into an ssh private
> key, so I can go back to classic ssh-
> agent. (And I will convert my GPG A private subkey to a SSH private key each
> time I rotate my subkeys) (this is not a
> big deal if I can automate it...)
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at

Sounds like you don't have GPG_TTY setup correctly. Did you pass over this part
of the documentation? Adding this to your .bashrc (or equivalent) should allow
whichever terminal you're using to access the gpg-agent

More information about the Gnupg-users mailing list