sign and encrypt from batch script

John A. Wallace jw72253 at verizon.net
Wed Mar 28 23:05:32 CEST 2012


Would it not help to try the option for the passphrase directly, like this:

 

--passphrase-file filename

 

From: gnupg-users-bounces at gnupg.org [mailto:gnupg-users-bounces at gnupg.org] On
Behalf Of Roberts, David M [ITSYS]
Sent: Wednesday, March 28, 2012 1:09 PM
To: gnupg-users at gnupg.org
Subject: sign and encrypt from batch script

 

I've got a batch script that signs and encrypts files using GnuPG1.2.6 running
on a REHL4 system.  We are upgrading the system to RHEL6 which comes with
Gnupg2.0.14 and the scripts no longer run correctly. 

 

gpg -u "signing-key" -r "receiving_pub-key" -sea -o /output.pgp --batch
--passphrase-fd 0 < /phrase.txt /plaintext.txt

 

When I run this command on the new system I get a message like this

 

You need a passphrase to unlock the secret key for

user: "signing-key"

2048-bit RSA key, ID EAA21D37, created 2012-03-26

can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory

 

I've tried to invoke the gpg-agent

gpg-agent -daemon -batch gpg -u "signing-key" -r "receiving_pub-key" -sea -o
/output.pgp --batch --passphrase-fd 0 < /phrase.txt /plaintext.txt

 

You need a passphrase to unlock the secret key for

user: "signing-key"

2048-bit RSA key, ID EAA21D37, created 2012-03-26

 

gpg: problem with the agent: Bad passphrase

gpg: skipped "signing-key": General error

 

 

We don't need S/MIME or Mail on this system, just GPG in batch mode.

 

Any help or insight is appreciated.

 

Thanks,

Dave

 

 

David M. Roberts

Iowa State University

Information Technology Services

dmrober at iastate.edu

515-294-0288

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20120328/e8be5e66/attachment.htm>


More information about the Gnupg-users mailing list