Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

When decrypting I get following error:

$ eyaml decrypt -s 'ENC and the key goes on here'
.gnupg --quiet --no-secmem-warning --no-permission-warning --no-tty --yes --decrypt)
failed with: gpg: Sorry, no terminal at all requested - can't get input

I have checked my keys, everything is in order. At this point I am out of options.

like image 361
roger moore Avatar asked Jul 29 '16 12:07

roger moore


3 Answers

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.

like image 140
vhs Avatar answered Nov 16 '22 02:11

vhs


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.

like image 39
oden Avatar answered Nov 16 '22 03:11

oden


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.

like image 4
Throw Away Account Avatar answered Nov 16 '22 03:11

Throw Away Account