0

I've been trying to figure out how to work the command lines for a GPA task that I want to automate. Currently, I just use GPA for Windows, select the key, select the file, check off "Armor", and click GO. There must be some command line interface for this. I'd like to work that into an automation program to eliminate the manual work.

Any ideas?

Martin Thorsen Ranang
  • 2,394
  • 1
  • 28
  • 43
BWS
  • 3,786
  • 18
  • 25

1 Answers1

1

Use both the --encrypt and --sign operations at the same time, eg.

gpg --armor --recipient a4ff2279 --sign --encrypt <input

Adjust the input pipe as needed, and on Windows systems you might need to use gpg.exe instead (and make sure GnuPG is in your path variable).

Jens Erat
  • 37,523
  • 16
  • 80
  • 96
  • "who" is the recipient ?? the resulting file then gets FTP'd to a remote site ... would this just use the same passcode/passphrase that the GPA gui uses ?? – BWS Nov 26 '14 at 18:20
  • The recipient can be either a key ID/fingerprint, or a user ID/mail address (but better use a key ID for scripting purposes, as GnuPG might ask you to pick the right recipient if using user IDs). This relies on the same keyring. In the end, GPA just uses a similar command line call internally. – Jens Erat Nov 26 '14 at 18:23