git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http: check CURLE_SSL_PINNEDPUBKEYNOTMATCH when emitting errors

From
Jeff King <peff@peff.net>
Date
Oct 11, 2021, 16:12 UTC
Message-ID
<YWRia5oAm4HddIe3@coredump.intra.peff.net>
In-Reply-To
<87k0ijlmon.fsf@evledraar.gmail.com>
On Mon, Oct 11, 2021 at 03:23:02PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 19 quoted lines
> > So it's supposed to be
> >
> >   ... a http.pinnedPubKey doesn't point to the http.pinnedPubKey
> >   variable ...
> >
> > ?  I still have no idea because of the repeated config variable name.
> 
> We emit this currently:
> 
>     $ git -c http.pinnedPubKey=sha256/someNonMatchingKey ls-remote https://github.com/git/git.git
>     fatal: unable to access 'https://github.com/git/git.git/': SSL: public key does not match pinned public key!
> 
> And with this change, this:
> 
>     $ git -c http.pinnedPubKey=sha256/someNonMatchingKey ls-remote https://github.com/git/git.git
>     fatal: unable to access 'https://github.com/git/git.git/' with http.pinnedPubkey configuration: SSL: public key does not match pinned public key!
> 
> I.e. this replaces a generic error message from curl with something that
> points the user at the config variable in question.

FWIW, I too had to stare at the commit message when I first read it. Perhaps:

  When curl gives us an error related to http.pinnedPubKey, we pass
  along the error from curl: "public key does not match pinned public
  key". But we do not mention the http.pinnedPubKey config, so the user
  may not realize where to start looking to address this.

As you say, this is already in next, so it's too late. So just thoughts for next time (I find this "we do X, but the problem is Y" explanation is often more clear than "change Z", because it makes the motivation explicit).

-Peff
Previous: Ævar Arnfjörð Bjarmason
Message 7 of 7 in “http: check CURLE_SSL_PINNEDPUBKEYNOTMATCH when emitting errors”
  1. http: check CURLE_SSL_PINNEDPUBKEYNOTMATCH when emitting errorsÆvar Arnfjörð Bjarmason, Sep 24, 2021
  2. Jeff KingSep 24, 2021
  3. SZEDER GáborOct 10, 2021
  4. Ævar Arnfjörð BjarmasonOct 11, 2021
  5. SZEDER GáborOct 11, 2021
  6. Ævar Arnfjörð BjarmasonOct 11, 2021
  7. Jeff KingOct 11, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.