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

Re: [PATCH v2] remote-curl: fall back to Basic auth if Negotiate fails

From
DDDan Langille (dalangil) <dalangil@cisco.com>
Date
Jan 6, 2015, 16:07 UTC
Message-ID
<AB98E028-8531-447B-959C-1DB385AB8578@cisco.com>
In-Reply-To
<3FBC0B0E-BB54-4BD5-AE7D-C82BA9FBA1C1@cisco.com>
Show 16 quoted lines
> On Jan 6, 2015, at 10:31 AM, Dan Langille (dalangil) <dalangil@cisco.com> wrote:
> 
> On Jan 5, 2015, at 6:53 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:
>> 
>> On Mon, Jan 05, 2015 at 09:23:32PM +0000, Dan Langille (dalangil) wrote:
>>> I have tried both patches.  Neither succeeds here.  I patched git version 2.2.1 but I don’t think that affects this.
>> 
>> You are patching the client side, correct?  That's the side that needs patching here.
> 
> Yes, I am.
> 
>> Just so the list knows, I will be sending a reroll to the existing patch, but the patches I've posted do indeed work in my testing.
> 
> I appreciate the patches.  I blame something here.
> 
> The patches don’t t apply cleanly to git-2.2.1 or to the latest git source I just cloned.  I had to copy/paste some two chunks in http.c and everything in remote-curl.c.

I tried again, with a proper copy of your patch. Cleanly patched versions of git 2.2.1 and from a recent clone of the repo both give 'Authentication failed’ when doing a clone without a ticket.

I’m sure there’s something here which is at fault.
Here is the client side debugging.  Is this what is expected?  Tested with a clone of git from this morning.
[dan@porter93 ~/tmp/tmp]$ ~/src/git/git clone https://us.example.org/git/clamav-bytecode-compiler
Cloning into 'clamav-bytecode-compiler'...
warning: templates not found /usr/home/dan/share/git-core/templates
* Couldn't find host us.example.org in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
*   Trying 10.0.0.1...
* Connected to us.example.org (10.0.0.1) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/certs/ca-root-nss.crt
  CApath: none
* SSL connection using TLSv1.0 / DHE-RSA-CAMELLIA256-SHA
* Server certificate:
* 	 subject: REDACTED
* 	 start date: REDACTED
* 	 expire date: REDACTED
* 	 issuer: REDACTED
* 	 SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
> GET /git/clamav-bytecode-compiler/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/2.2.1.212.gc5b9256.dirty
Host: us.example.org
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Date: Tue, 06 Jan 2015 16:02:38 GMT
< Server: Apache
< WWW-Authenticate: Negotiate
< Content-Length: 401
< Content-Type: text/html; charset=iso-8859-1
< 
* Connection #0 to host us.example.org left intact
Username for 'https://us.example.org': 
Password for 'https://dan@us.example.org': 
* Couldn't find host us.example.org in the .netrc file; using defaults
* Connection 0 seems to be dead!
* Closing connection 0
* Hostname was found in DNS cache
*   Trying 10.0.0.1...
* Connected to us.example.org (10.0.0.1) port 443 (#1)
* successfully set certificate verify locations:
*   CAfile: /usr/local/share/certs/ca-root-nss.crt
  CApath: none
* SSL re-using session ID
* SSL connection using TLSv1.0 / DHE-RSA-CAMELLIA256-SHA
* Server certificate:
* 	 subject: REDACTED
* 	 start date: REDACTED
* 	 expire date: REDACTED
* 	 issuer: REDACTED
* 	 SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
> GET /git/clamav-bytecode-compiler/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/2.2.1.212.gc5b9256.dirty
Host: us.example.org
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Date: Tue, 06 Jan 2015 16:02:48 GMT
< Server: Apache
< WWW-Authenticate: Negotiate
< Content-Length: 401
< Content-Type: text/html; charset=iso-8859-1
< 
* Connection #1 to host us.example.org left intact
fatal: Authentication failed for 'https://us.example.org/git/clamav-bytecode-compiler/'
[dan@porter93 ~/tmp/tmp]$ 
Previous: Dan Langille (dalangil)Next: brian m. carlson
Message 22 of 39 in “git-http-backend auth via Kerberos”
  1. Dan Langille (dalangil)Dec 18, 2014
  2. brian m. carlsonDec 18, 2014
  3. Dan Langille (dalangil)Dec 19, 2014
  4. Dan Langille (dalangil)Dec 19, 2014
  5. Dan Langille (dalangil)Dec 19, 2014
  6. brian m. carlsonDec 19, 2014
  7. Dan Langille (dalangil)Dec 19, 2014
  8. remote-curl: fall back to Basic auth if Negotiate fails.brian m. carlson, Dec 27, 2014
  9. Jeff KingDec 27, 2014
  10. brian m. carlsonDec 27, 2014
  11. Jeff KingDec 27, 2014
  12. brian m. carlsonDec 28, 2014
  13. remote-curl: fall back to Basic auth if Negotiate failsbrian m. carlson, Jan 1, 2015
  14. Jeff KingJan 3, 2015
  15. brian m. carlsonJan 3, 2015
  16. Jeff KingJan 3, 2015
  17. Dan Langille (dalangil)Jan 5, 2015
  18. Dan Langille (dalangil)Jan 5, 2015
  19. brian m. carlsonJan 5, 2015
  20. Dan Langille (dalangil)Jan 6, 2015
  21. Dan Langille (dalangil)Jan 6, 2015
  22. Dan Langille (dalangil)Jan 6, 2015
  23. brian m. carlsonJan 8, 2015
  24. remote-curl: fall back to Basic auth if Negotiate failsbrian m. carlson, Jan 8, 2015
  25. Dan Langille (dalangil)Jan 20, 2015
  26. Junio C HamanoJan 21, 2015
  27. Dan Langille (dalangil)Jan 22, 2015
  28. Dan Langille (dalangil)Feb 17, 2015
  29. Junio C HamanoFeb 17, 2015
  30. Dan Langille (dalangil)Feb 18, 2015
  31. brian m. carlsonFeb 19, 2015
  32. Dan Langille (dalangil)Feb 24, 2015
  33. Dan Langille (dalangil)Feb 25, 2015
  34. Dan Langille (dalangil)Mar 10, 2015
  35. brian m. carlsonMar 10, 2015
  36. Dan Langille (dalangil)Mar 11, 2015
  37. brian m. carlsonMar 11, 2015
  38. Dan Langille (dalangil)Mar 12, 2015
  39. Dan Langille (dalangil)Jan 5, 2015

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.