I haven't used gpg-zip before. I am trying to compress and encrypt a directory with more than 200 files. I did a test run with a smaller directory containing just a dozen PDFs in it, a folder I'll call "PDFfolder."

man gpg-zip offers the following template as a guide for a user named Bob who wants to do this with a directory labeled "mydocs":

 gpg-zip --encrypt --output test1 --gpg-args -r Bob mydocs

I did this precisely, using my email address, which is also attached to my PGP public key, and of course tied to my user ID in my own public key ring:

 gpg-zip --encrypt --output test1 --gpg-args -r myemail@emymail.com PDFfolder

I keep getting the following error:

gpg: missing argument for option "-r"
/bin/tar: myemail@emymail.com: Cannot stat: No such file or directory

What am I doing wrong?

I should add that the "-r" argument works just fine for me using gpg normally, to encrypt.

  • Is "myemail@emymail.com" your ID? -r needs the ID, according to the man page – schroeder Jan 4 at 14:39

The man page is kind of misleading. There should only be a single parameter following the --gpg-args, i.e. you need to quote it properly:

  gpg-zip --encrypt --output test1 --gpg-args '-r myemail@emymail.com' PDFfolder

Apart from that you can just use the -r or --recipient option of gpg-zip directly (this is documented), there is no need to use it with --gpg-args.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.