Explicit command for particular behavior

Rick Nakroshis rick at nakroshis.com
Wed Sep 13 02:45:17 CEST 2017


On Tue, Sep 12, 2017 at 3:07 PM, <ryan at splintermail.com> wrote:

> Hi Gnupg-Users,
>
> I am developing an email service that automatically gpg-encrypts all
> email that a user recieves before it is written to disk.  To manage this
> reasonably, I was developing a tool for users to submit their public
> key, as output from:
>
>   gpg --export --armored some_key_id  >  keyfile
>
> But then I wanted perform some basic checks on the file submitted, and I
> found this fantastic behavior:
>
>   cat keyfile | gpg --with-colons --with-fingerprints
>
> which outputs something that is stable and easily parsable.  Except...
> It also gives me the following error:
>
>   gpg: WARNING: no command supplied.  Trying to guess what you mean ...
>
> But I tried literally every command from `gpg --dump-options`, and
> nothing replicated the output I needed without the same error.
>
>
> So... is there a command that explicitly calls for the behavior I want?
>
> Ryan
>

Ryan,

What version of GPG are you using?  I used v2.2.0 and had to make some
minor changes

--armor instead of --armored

--fingerprint instead of --with-fignerprints

After those changes, it worked just fine, and did output four lines that
were nicely parseable and without any error messages.


Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20170912/3d44e02c/attachment-0001.html>


More information about the Gnupg-users mailing list