Page MenuHome GnuPG

GPG is throwing error while doing (encryption+sign) or Decryption
Closed, InvalidPublic

Description

Hi,
GPG works fine with the version 1.4.20 But our admin has upgraded it to 2.2.17 After upgrading, gpg is throwing error saying
"gpg: signing failed: No pinentry".

But it is working good for just encryption. We are having a tough time to resolve this issue. Could you please guide us on how can we fix above issue. We are using Solaris 11.4

Details

Version
2.2.8

Event Timeline

sarman triaged this task as Unbreak Now! priority.Mar 23 2020, 11:53 PM
sarman updated the task description. (Show Details)
gniibe added a subscriber: gniibe.

For operations which require private key, it is needed to unlock private key.

You can:

(1) Install pinentry

or

(2) Use an option --pinentry-mode=loopback, so that you can input password by TTY

Hello Team,

Thanks a lot for your help. With your suggestion, it fixed the (encryption+ sign) issue. But still we have issue in decrypting the file.
We have below error message while executing below decryption statement.

gpg -d --pinentry-mode=loopback --no-tty --passphrase-file /opt/mis/apps/oraApps/gpg/Omni_Passphrase_PRD.txt --output EXP20200316061950.xml EXP20200316061950.xml.gpg

gpg: decryption failed: No secret key

Could you please help me in resolving below as well?

Thanks & Regards,
Sarma Nori.

I think that what you want is adding --batch option. In the gpg manual, we have:

--passphrase-file file
       Read  the passphrase from file file. Only the first line will be
       read from  file  file.  This  can  only  be  used  if  only  one
       passphrase is supplied. Obviously, a passphrase stored in a file
       is of questionable security if other users can read  this  file.
       Don't use this option if you can avoid it.

       Note  that since Version 2.0 this passphrase is only used if the
       option --batch has  also  been  given.  Since  Version  2.1  the
       --pinentry-mode also needs to be set to loopback.

... and the last paragraph matters.

werner lowered the priority of this task from Unbreak Now! to Needs Triage.
werner edited projects, added Not A Bug; removed Bug Report.
werner added a subscriber: werner.

@sarman: Your question is actually a support question and not a bug report. Please read the documentation, use the public help channels (so that other can also learn from the issue), or get in touch with a commercial support provider.