gpg-zip : passphrase as parameter for scripts

Ingo Klöcker kloecker at kde.org
Mon Apr 4 22:39:49 CEST 2011


On Monday 04 April 2011, arno.s wrote:
> I am using in a script, with more than one of this kind of lines:
> 
> #!/bin/sh
> /usr/local/bin/gpg-zip -o /opt/u1.tar.gpg -s /opt/1*
> /usr/local/bin/gpg-zip -o /opt/u2.tar.gpg -s /opt/2*
> ...
> 
> I have to answer every line with question for passphrase. This sucks.
> 
> I have seen there is a parameter --gpg-args where I can pass args to
> gpg. But I don't get this working with some kind of
> 
> echo 'passphrase' | gpg-zip --gpg-args --passphrase-fd -o ... - s
> 
> Anybody an idea how this is working?

Yes. Remove the passphrase from your secret key. If you are going to 
publish your passphrase to everybody using your system by using it as 
command line argument then you can as well remove the passphrase from 
your key.


Regards,
Ingo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20110404/f1a0850b/attachment.pgp>


More information about the Gnupg-users mailing list