I see no way to decrypt an archive passed to gpgtar via stdin.
$ gpgtar --version gpgtar (GnuPG) 2.4.1-beta7 $ gpgtar --decrypt <~/dev/g10/testdata/decrypt-me-sym.tar.asc Usage: gpgtar [options] [files] [directories] (-h for help) $ gpgtar --decrypt - <~/dev/g10/testdata/decrypt-me-sym.tar.asc gpg: decrypt_message failed: Unknown system error gpgtar: error reading '[?]': premature EOF (size of last record: 0) $ ls -lR -- -_1_ -_1_: total 0
The following patch avoids the usage message:
diff --git a/tools/gpgtar.c b/tools/gpgtar.c index 8461666b9..252d80c1d 100644 --- a/tools/gpgtar.c +++ b/tools/gpgtar.c @@ -531,7 +531,7 @@ main (int argc, char **argv) break; case aDecrypt: - if (argc != 1) + if (argc > 1) gpgrt_usage (1); if (opt.outfile) log_info ("note: ignoring option --output\n");
Update: If I omit the --dry-run option, then passing no filename to gpgtar works. So, applying the above patch fixes the problem and matches the check for --list-archive and the behavior of gpgtar without crypto operations.