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

Re: git smart-http do not authent to allow git ls-remote to be called anonymously

From
Jeff King <peff@peff.net>
Date
Oct 14, 2012, 06:30 UTC
Message-ID
<20121014063022.GA14812@sigill.intra.peff.net>
In-Reply-To
<CAHtLG6T=hFsSy=ScRK2cYBoUcmAG_tsg12FiFMTvzpHGmPTzfg@mail.gmail.com>
[re-adding git@vger; please keep discussion on-list]
On Sun, Oct 14, 2012 at 01:29:13PM +0800, 乙酸鋰 wrote:
> Sorry, it does not serve the request. It returns http 401.
> But if I add the username and password as a part of the URL, it succeeds.

In that case, then you probably need to upgrade your client version of git, as I mentioned here:

Show 7 quoted lines
> >> Or is it that the server tells git that it needs authorization, but git
> >> does not prompt, and instead just fails with "Authentication failed". In
> >> that case, the issue is that you need a newer git client. Traditionally
> >> the client expected to handle authentication during the initial
> >> "info/refs" request. I added support for handling authentication during
> >> later requests in commit b81401c, which is in git v1.7.11.7 and
> >> v1.7.12.1.
-Peff
Previous: Jeff KingNext: Jeff King
Message 4 of 7 in “git smart-http do not authent to allow git ls-remote to be called anonymously”
  1. 乙酸鋰Sep 30, 2012
  2. Shawn PearceOct 1, 2012
  3. Jeff KingOct 1, 2012
  4. Jeff KingOct 14, 2012
  5. Jeff KingOct 31, 2012
  6. 1/2 remote-curl: hoist gzip buffer size to top of post_rpcJeff King, Oct 31, 2012
  7. 2/2 remote-curl: retry failed requests for auth even with gzipJeff King, Oct 31, 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.