Hi, I am also dealing with same problem of automating the decryption process. I have done according help manual as shwon below. I get error and I do not know how to proceed:
generic command: type passphrase | gpg --passphrase-fd 0 --decypt-file "File Name" in my case it looks like: type "C:\SampleProjects\GnuPGDotNet\GnuPG\passphrase.txt" | gpg --passphrase-fd 0 decrypt-files "C:\DocLib\EncryptedFile\Clock1.swf.gpg" I get one of the following errors: Reading passphrase from file descriptor 0 usage: gpg [options] [filename] OR if I use --decrypt-files instead decrypt-files I get following error: Reading passphrase from file descriptor 0 gpg: encrypted with ELG-E key, ID ECEB4FC5 gpg: decryption failed: secret key not available I am using GPG version of 1.4.5 on windowsXP professional and default dirctory of secring is C:\Documents and Settings\bgadhia\Application Data\gnupg. And my public key is at C:\DocLib\PublicKey I am able to encrypt and decrypt using UI tools provieded by GPG and WinPT. Bharat Gadhia Brian Rosenvinge wrote: > > Thanks so much, it worked like a charm. I just had to change "cat" to > "type". > > I don't mind supplying the passphrase in the script or in a file if > there is a way to automate this process. I am not sure where a > "--passphrase-fd" could be used, if it is even possible. > > Thanks Brian > > David Shaw wrote: > >>On Fri, Aug 11, 2006 at 10:39:57AM -0500, >> >>cat thefile.gpg | gpg | gpg -r recipient_1 -r recipient_2 -r recipient_3 --encrypt > output.gpg >> >>The catch is that the first gpg instance is doing to need to prompt >>you for a passphrase, and the second gpg instance may need to prompt >>you whether the recipients are trusted (if you don't have a trust path >>to them). An easy way to fix this, is to add a "--trust-model always" >>to the second instance (assuming you really do trust those recipient >>keys). >> >>David >> >>_______________________________________________ >>Gnupg-users mailing list >>[email protected] >>http://lists.gnupg.org/mailman/listinfo/gnupg-users >> >> > > _______________________________________________ > Gnupg-users mailing list > [email protected] > http://lists.gnupg.org/mailman/listinfo/gnupg-users > > -- View this message in context: http://www.nabble.com/GPG-question-tf2091871.html#a5988271 Sent from the GnuPG - User forum at Nabble.com. _______________________________________________ Gnupg-users mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnupg-users
