Newbie question - how to include the pass phrase in the command

Ping Kam pkam@quikcard.com
Fri Jun 6 01:59:01 2003


----- Original Message -----
From: "Steve Butler" <sbutler@fchn.com>
To: "'Ping Kam'" <pkam@quikcard.com>; <gnupg-users@gnupg.org>
Sent: Thursday, June 05, 2003 12:24 PM
Subject: RE: Newbie question - how to include the pass phrase in the command


>
>
> I'd change this from:
>
> echo %1|gpg  --encrypt --output %2.asc --armour --recipient
> our_own_userid --encrypt-to the_recipient_userid --passphrase-fd 0 %2
>
>
> To this <<all on one line>>:
>
> echo %1 | gpg --passphrase-fd 0 --armour --recipient %3 --encrypt-to
> <<our_own_userid>> --sign --output %2.asc --encrypt %2
>
>
>
> Then invoke it:
>
> my_gpg "my passphrase" my_file to_whom_it_concerns
>
I change the cmd file following your suggestion and it stops working.

Before the change, I got the following message but it creates the file.:
Reading passphrase from file descriptor 0

You need a passphrase to unlock the secret key for
user: ...........



After the change:
Reading passphrase from file descriptor 0

You need a passphrase to unlock the secret key for
user: ..........

Could not find a valid trust path to the key.  Let's see whether we
can assign some missing owner trust values.

No path leading to one of our keys found.

// The key id and figerprint

It is NOT certain that the key belongs to its owner.
If you *really* know what you are doing, you may answer
the next question with yes

Use this key anyway?



What is the difference and why one works and the other does not?

Thanks,
Ping Kam