can't get passphrase-fd option to work with GnuPG on HPUX when running a scheduled batch

Daniel Carrera dcarrera@math.toronto.edu
Tue Aug 13 19:38:01 2002


Try:

echo "mypassphrase" | gpg --passphrase-fd 0 --decrypt myfile.txt.pgp


On Tue, 13 Aug 2002, poney wrote:

> Hi, I'm new to the list. Sorry to join just when I need help with a problem,
> but goes.
>
> We're trying to use the --passphrase-fd option with GnuPG from a shell script
> running through a batch run by scheduling software (ESP) on HPUX11.0 (not a
> good idea, I know, but it's what we need). We're using gpg version 1.0.7.
> Even though we can get the script to work when run interactively, regardless
> of how we use the option (using standard in or with a real file descriptor),
> the gpg command is failing when run through the scheduling software with the
> following error:
>
> gpp: cannot open /dev/tty: No such device or address
>
> I was assuming this had something to do with the process running the script
> not having access to standard in in the same way that the script has when we
> run it interactively. I've had the scheduling software su to the correct user
> to help set the environment correctly, but it still doesn't work. I'm looking
> for suggestions with trouble-shooting the problem.
>
> Not sure if it's related, but I've never been able to successfuly use a real
> file descriptor with the --passphrase-fd option on this platform. This works
> in a shell script:
>
> gpg --passphrase-fd 0 --decrypt myfile.txt.pgp <<!
> mypassphrase
> !
>
> But this just prompts me for the passphrase:
>
> gpg --passphrase-fd secretinfo.txt --decrypt myfile.txt.pgp
>
> I've specified the path to the file in a number of ways, to try to ensure it
> can find the file, but it still won't work. I've also tried using the option
> in with a number of other options (--output, --yes, etc) since I've noticed
> that using some options together seems to change the behavior of the gpg
> command in unexpexted ways, but I still can't make it work.
>
> Any thoughts on what could be causing the problem, or suggestions about how
> to get around it?
>
> Poney Carpenter
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>