Skip to content

Update gpg.txt to correct gpg --verify syntax#285

Closed
rtmorgan wants to merge 1 commit into
gitgitgadget:masterfrom
rtmorgan:patch-1
Closed

Update gpg.txt to correct gpg --verify syntax#285
rtmorgan wants to merge 1 commit into
gitgitgadget:masterfrom
rtmorgan:patch-1

Conversation

@rtmorgan

@rtmorgan rtmorgan commented Jul 11, 2019

Copy link
Copy Markdown

The gpg --verify usage example within the 'gpg.program' variable reference provides an incorrect example of the gpg --verify command arguments. The command argument order, when providing both a detached signature and data, should be signature first and data second: https://gnupg.org/documentation/manuals/gnupg/Operational-GPG-Commands.html#index-verify.

Signed-off-by: Robert T Morgan robert.thomas.morgan@gmail.com

@gitgitgadget

gitgitgadget Bot commented Jul 11, 2019

Copy link
Copy Markdown

Welcome to GitGitGadget

Hi @rtmorgan, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests.

Please make sure that this Pull Request has a good description, as it will be used as cover letter.

Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:

  • the lines should not exceed 76 columns,
  • the first line should be like a header and typically start with a prefix like "tests:" or "commit:", and
  • the commit messages' body should be describing the "why?" of the change.
  • Finally, the commit messages should end in a Signed-off-by: line matching the commits' author.

It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code.

Contributing the patches

Before you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a PR comment of the form /allow <username>.

Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment /submit.

After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions.

If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox ("raw") file corresponding to the mail you want to reply to from the Git mailing list. If you use GMail, you can upload that raw mbox file via:

curl -g --user "<EMailAddress>:<Password>" --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt

@dscho

dscho commented Jul 12, 2019

Copy link
Copy Markdown
Member

Welcome, @rtmorgan!

Could you also please wrap the commit message at <= 76 columns per line?

@dscho

dscho commented Jul 12, 2019

Copy link
Copy Markdown
Member

/allow rtmorgan

@gitgitgadget

gitgitgadget Bot commented Jul 12, 2019

Copy link
Copy Markdown

User rtmorgan is now allowed to use GitGitGadget.

@dscho

dscho commented Jul 12, 2019

Copy link
Copy Markdown
Member

Also, maybe replace

Update gpg.txt to correct gpg --verify syntax

by

gpg(docs): use correct --verify syntax

@rtmorgan

Copy link
Copy Markdown
Author

Thank you @dscho . I'll make those changes.

The gpg --verify usage example within the 'gpg.program' variable
reference provides an incorrect example of the gpg --verify command
arguments.

The command argument order, when providing both a detached signature
and data, should be signature first and data second:
https://gnupg.org/documentation/manuals/gnupg/Operational-GPG-Commands.html

Signed-off-by: Robert Morgan <robert.thomas.morgan@gmail.com>
@rtmorgan

Copy link
Copy Markdown
Author

/submit

@gitgitgadget

gitgitgadget Bot commented Jul 12, 2019

Copy link
Copy Markdown

Submitted as pull.285.git.gitgitgadget@gmail.com

@@ -2,7 +2,7 @@ gpg.program::
Use this custom program instead of "`gpg`" found on `$PATH` when

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

"Robert Morgan via GitGitGadget" <gitgitgadget@gmail.com> writes:

> diff --git a/Documentation/config/gpg.txt b/Documentation/config/gpg.txt
> index f999f8ea49..cce2c89245 100644
> --- a/Documentation/config/gpg.txt
> +++ b/Documentation/config/gpg.txt
> @@ -2,7 +2,7 @@ gpg.program::
>  	Use this custom program instead of "`gpg`" found on `$PATH` when
>  	making or verifying a PGP signature. The program must support the
>  	same command-line interface as GPG, namely, to verify a detached
> -	signature, "`gpg --verify $file - <$signature`" is run, and the
> +	signature, "`gpg --verify $signature - <$file`" is run, and the
>  	program is expected to signal a good signature by exiting with
>  	code 0, and to generate an ASCII-armored detached signature, the
>  	standard input of "`gpg -bsau $key`" is fed with the contents to be

Wow.  Good find.

gpg-interface.c::verify_signed_buffer() takes a detached signature
in core, writes it to a temporary file and runs 

    gpg --status-fd=1 --verify $the_temporary_file

and the payload that is supposed to match the given signature is fed
via the standard input, so the above documentation is the only thing
that needs fixing, which is good ;-)

Thanks.



Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Robert Morgan wrote (reply to this):

Thanks Junio.

I was looking at 'smimesign' and working to understand how, when set
within 'gpg.program', it conformed with gpg's usage within git
sign,verify etc.  I happened to look at the docs for the 'gpg.program'
config variable and noticed the discrepancy.

Thanks again,
Robert

On Fri, Jul 12, 2019 at 11:47 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> "Robert Morgan via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > diff --git a/Documentation/config/gpg.txt b/Documentation/config/gpg.txt
> > index f999f8ea49..cce2c89245 100644
> > --- a/Documentation/config/gpg.txt
> > +++ b/Documentation/config/gpg.txt
> > @@ -2,7 +2,7 @@ gpg.program::
> >       Use this custom program instead of "`gpg`" found on `$PATH` when
> >       making or verifying a PGP signature. The program must support the
> >       same command-line interface as GPG, namely, to verify a detached
> > -     signature, "`gpg --verify $file - <$signature`" is run, and the
> > +     signature, "`gpg --verify $signature - <$file`" is run, and the
> >       program is expected to signal a good signature by exiting with
> >       code 0, and to generate an ASCII-armored detached signature, the
> >       standard input of "`gpg -bsau $key`" is fed with the contents to be
>
> Wow.  Good find.
>
> gpg-interface.c::verify_signed_buffer() takes a detached signature
> in core, writes it to a temporary file and runs
>
>     gpg --status-fd=1 --verify $the_temporary_file
>
> and the payload that is supposed to match the given signature is fed
> via the standard input, so the above documentation is the only thing
> that needs fixing, which is good ;-)
>
> Thanks.
>
>
>

@gitgitgadget

gitgitgadget Bot commented Jul 12, 2019

Copy link
Copy Markdown

This branch is now known as rm/gpg-program-doc-fix.

@gitgitgadget

gitgitgadget Bot commented Jul 12, 2019

Copy link
Copy Markdown

This patch series was integrated into pu via git@73d6c04.

@gitgitgadget

gitgitgadget Bot commented Jul 15, 2019

Copy link
Copy Markdown

This patch series was integrated into pu via git@d4f65ce.

@gitgitgadget

gitgitgadget Bot commented Jul 15, 2019

Copy link
Copy Markdown

This patch series was integrated into pu via git@b7a8064.

@gitgitgadget

gitgitgadget Bot commented Jul 15, 2019

Copy link
Copy Markdown

This patch series was integrated into next via git@ef358ec.

@gitgitgadget gitgitgadget Bot added the next label Jul 15, 2019
@gitgitgadget

gitgitgadget Bot commented Jul 19, 2019

Copy link
Copy Markdown

This patch series was integrated into pu via git@34e59b8.

@gitgitgadget

gitgitgadget Bot commented Jul 23, 2019

Copy link
Copy Markdown

This patch series was integrated into pu via git@f9e6839.

@gitgitgadget

gitgitgadget Bot commented Jul 25, 2019

Copy link
Copy Markdown

This patch series was integrated into pu via git@edefaa5.

@gitgitgadget

gitgitgadget Bot commented Jul 25, 2019

Copy link
Copy Markdown

This patch series was integrated into next via git@edefaa5.

@gitgitgadget

gitgitgadget Bot commented Jul 25, 2019

Copy link
Copy Markdown

This patch series was integrated into master via git@edefaa5.

@gitgitgadget gitgitgadget Bot added the master label Jul 25, 2019
@gitgitgadget gitgitgadget Bot closed this Jul 25, 2019
@gitgitgadget

gitgitgadget Bot commented Jul 25, 2019

Copy link
Copy Markdown

Closed via edefaa5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants