gpg commands that show a menu does not work for Gpg4win 3.0.0 and MSYS2


I am using gpg 2.2.1, installed by Gpg4win 3.0, in an MSYS2 terminal.

I have a problem with all commands that should show a menu, for example ‘gpg --gen-key’, ‘gpg --edit-key’, when they are run in the MSYS2 terminal.
They just hang without printing the menu. Some commands print the copyright header before hanging.

If run from a Windows terminal then the menus work as expected.

My suspicion is that the menu is not printed to the correct terminal (mintty).

My suspicion was correct, gpg was trying to print to a Windows console, which mintty is not.

The problem was solved by installing winpty ( and make an alias for starting gpg using winpty:
alias gpg=‘winpty – gpg’


good to read that it works for you now.
(The pinentry applications need to have a way to find their output,
my guess is that you’ve used a “text-mode” pinentry.)

Thanks for sharing,