gpgtar how to cipher a folder like gpg?

Hello,

I didn’t find a complet man for gpgtar

I have to protect a folder but I don’t know all option available to do the same thing like gpg

to protect with gpg2 I use this:

gpg2 --output D:\folder\destinationfile.gpg --encrypt --cipher-algo AES256 --compress-algo none --trust-model always --recipient my.user@domain.com sourcefile.txt

I would like to protect D:\foldertoprotect in D:\folderprotectedfile.gpg (or tar.gpg)…

Could you help me with that? I use only the gpg4win-light.

Thanks

Dear Guillaume,
did you try
gpgtar --help
?
Best,
Bernhard

Thanks for the reply :slight_smile:

Well, It was my first reaction.

gpgtar (GnuPG) 2.0.26 (Gpg4win 2.2.3)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Syntax: gpgtar [options] [files] [directories]
Encrypt or sign files into an archive

Commandes :

-e, --encrypt create an archive
-d, --decrypt extract an archive
-s, --sign create a signed archive
-t, --list-archive list an archive

Options :

-c, --symmetric use symmetric encryption
-r, --recipient IDENTITÉ
chiffrer pour l’IDENTITÉ
-u, --local-user IDENTITÉ
utiliser l’IDENTITÉ pour signer ou déchiffrer
-o, --output FICHIER
Écrire la sortie dans le FICHIER
-v, --verbose bavard
-q, --quiet devenir beaucoup plus silencieux
–skip-crypto skip the crypto processing
-T, --files-from FILE
get names to create from FILE
–null -T reads null-terminated names

But all options are not here.

When I use GPGEX (but I can’t in this case), it write the command like this:

“C:\Program Files (x86)\GNU\GnuPG\gpgtar.exe” --openpgp --skip-crypto --output - --encrypt -T- --null –

you can see the option --opengpg which is not present in the help.
That why a ask how it’s working.

did you have an idea?

I was often confused by this too. It looks like gpgtar was intended to support crypto operations but then it was not implemented. kleopatra at least runs it with skip-crypto to just create a tar file and uses the output as an input for gnupg to do the actual crypto work.

This is probably also what you want: (–output -) tells gpgtar to write to stdout

C:\Program Files (x86)\GNU\GnuPG\gpgtar.exe --skip-crypto --output - --encrypt | C:\Program Files (x86)\GNU\GnuPG\gpg2.exe

You can of course use the output of every other archiver for this that can print its output to stdout (like 7zip)