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

Re: git clone over http with basic auth bug?

From
Jeff King <peff@peff.net>
Date
Sep 22, 2012, 05:09 UTC
Message-ID
<20120922050935.GA4542@sigill.intra.peff.net>
In-Reply-To
<505CFA42.9090504@pjr.cc>
On Sat, Sep 22, 2012 at 09:37:38AM +1000, Paul J R wrote:
Show 12 quoted lines
> Im not sure if this is a bug, or just "as implemented". But when
> cloning from a repo sitting on a web site that uses basic auth, the
> git client appears to forget its authentication info and ignores the
> 401's the server is sending back. It appears to initially login and
> get refs and HEAD ok, but after that it never authenticates again.
> Using a .netrc file this will work (or a url of the form
> http://user:pass@host though http://user@host wont), but i'm curious
> if theres a way of doing this without having to expose the password
> in some way?
> 
> Im using git 1.7.9.5 and when i clone i get the following:
> [...]
>From your logs, it looks like you are using the "dumb" http protocol

(wherein the server does not have to understand git at all). In this protocol, we end up making multiple simultaneous requests for objects with different curl handles. We had a bug where not all handles are told about the credential (but it doesn't always happen; it depends on the exact pattern of requests).

This was fixed by dfa1725 (fix http auth with multiple curl handles, 2012-04-10), which is in git v1.7.10.2 and higher.

Can you try upgrading to see if that fixes your problem?
-Peff
Previous: Paul J RNext: Paul J R
Message 2 of 4 in “git clone over http with basic auth bug?”
  1. Paul J RSep 21, 2012
  2. Jeff KingSep 22, 2012
  3. Paul J RSep 22, 2012
  4. Shawn PearceSep 23, 2012

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.