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

Re: [PATCH 2/3] http: attempt Negotiate auth in http.emptyAuth=auto mode

From
Matthew John Cheetham <mjcheetham@outlook.com>
Date
Apr 28, 2026, 14:38 UTC
Message-ID
<VI0PR03MB11634FE845793CEA7D25FA2D0C0372@VI0PR03MB11634.eurprd03.prod.outlook.com>
In-Reply-To
<xmqq7bq63lll.fsf@gitster.g>
On 2026-04-16 17:40, Junio C Hamano wrote:
Show 12 quoted lines
>> The true and false modes are unchanged: true sends empty credentials
>> on the very first request (before any 401), and false never sends
>> them.
> 
> OK.  This is a tangent, but "git config --help" on "http.emptyAuth"
> is horrible.  It does not say what the allowed values are, so I had
> to first write "There are million other things in the system that
> this patch does not modify, so what's the point of singling out
> these two settings and saying that this patch does not change
> them?", before realizing that 'auto' the patch (and the explanation
> of the "empty-autho auto-detction" above) is about the third
> possiblity of the same variable and take it back.

Agreed - the existing description is pretty opaque about what values it actually takes. Should I add another patch to this series to spell out the three values explicitly? How about something like this:

      http.emptyAuth::
              Attempt authentication without seeking a username or
              password.  This can be used to attempt GSS-Negotiate
              authentication without specifying a username in the URL,
              as libcurl normally requires a username for
              authentication. Possible values are:
      +
      --
      * `auto` (default) - Send empty credentials only if the server's
        401 response advertises an authentication mechanism that
        requires them (such as GSS-Negotiate); otherwise fall back to
        prompting via the credential helper.
      * `true` - Always send empty credentials on the very first
        request, before receiving any 401 response from the server.
      * `false` - Never send empty credentials. Mechanisms that
        require empty credentials, such as GSS-Negotiate, will not
        work.
      --
  Does that read better?
  Thanks,
  Matthew
Previous: Junio C HamanoNext: Matthew John Cheetham via GitGitGadget
Message 6 of 13 in “http: fix emptyAuth=auto for Negotiate/SPNEGO”
  1. 0/3 http: fix emptyAuth=auto for Negotiate/SPNEGOMatthew John Cheetham via GitGitGadget, Apr 16, 2026
  2. 1/3 http: extract http_reauth_prepare() from retry pathsMatthew John Cheetham via GitGitGadget, Apr 16, 2026
  3. Junio C HamanoApr 16, 2026
  4. 2/3 http: attempt Negotiate auth in http.emptyAuth=auto modeMatthew John Cheetham via GitGitGadget, Apr 16, 2026
  5. Junio C HamanoApr 16, 2026
  6. Matthew John CheethamApr 28, 2026
  7. 3/3 t5563: add tests for http.emptyAuth with NegotiateMatthew John Cheetham via GitGitGadget, Apr 16, 2026
  8. 0/4 http: fix emptyAuth=auto for Negotiate/SPNEGOMatthew John Cheetham via GitGitGadget, Apr 30, 2026
  9. 1/4 http: extract http_reauth_prepare() from retry pathsMatthew John Cheetham via GitGitGadget, Apr 30, 2026
  10. 2/4 http: attempt Negotiate auth in http.emptyAuth=auto modeMatthew John Cheetham via GitGitGadget, Apr 30, 2026
  11. 3/4 t5563: add tests for http.emptyAuth with NegotiateMatthew John Cheetham via GitGitGadget, Apr 30, 2026
  12. 4/4 doc: clarify http.emptyAuth valuesMatthew John Cheetham via GitGitGadget, Apr 30, 2026
  13. Matthew John CheethamApr 30, 2026

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.