gpg: Sorry, no terminal at all requested - can't get input gpg: Sorry, no terminal at all requested - can't get input linux linux

gpg: Sorry, no terminal at all requested - can't get input


If you configured Automatic Git commit signing with GPG on macOS and you see this error comment out no-tty in ~/.gnupg/gpg.conf as suggested by Fahl-Design.

enter image description here

This will also allow you to generate new GPG keys following the GitHub instructions for new keys.


You need to remove the option --no-tty

--no-tty
Make sure that the TTY (terminal) is never used for any output. This option is needed in some cases because GnuPG sometimes prints warnings to the TTY even if --batch is used.


For those who are encountering this error from scripts that are running with no TTY available, adding --batch to the GPG command line, or batch to a line in ~/.gnupg/gpg.conf can make the problem go away.