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

Re: [PATCH] Prompt for a username when an HTTP request 401s

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Mar 19, 2010, 09:13 UTC
Message-ID
<be6fef0d1003190213m48b6c91dx5cbd489cf798dacc@mail.gmail.com>
In-Reply-To
<d411cc4a1003182041p67a93bf6i1528a8eaaab5c805@mail.gmail.com>
Hi,
On Fri, Mar 19, 2010 at 11:41 AM, Scott Chacon <schacon@gmail.com> wrote:
Show 7 quoted lines
> When an HTTP request returns a 401, Git will currently fail with a
> confusing message saying that it got a 401.  This changes
> http_request to prompt for the username and password, then return
> HTTP_REAUTH so http_get_strbuf can try again.  If it gets a 401 even
> when a user/pass is supplied, http_request will now return HTTP_NOAUTH
> which remote_curl can then use to display a more intelligent error
> message that is less confusing.
(added Daniel to the Cc list)

how are you getting 401s? Recently, git set the CURL_AUTH_ANY option, so if the correct credentials are passed, curl should have "hid" the 401 from us.

-- 
Cheers,
Ray Chuan
Previous: Scott ChaconNext: Daniel Stenberg
Message 2 of 8 in “Prompt for a username when an HTTP request 401s”
  1. Prompt for a username when an HTTP request 401sScott Chacon, Mar 19, 2010
  2. Tay Ray ChuanMar 19, 2010
  3. Daniel StenbergMar 19, 2010
  4. Shawn O. PearceMar 19, 2010
  5. Shawn O. PearceMar 19, 2010
  6. Scott ChaconMar 19, 2010
  7. Shawn O. PearceMar 19, 2010
  8. Junio C HamanoMar 19, 2010

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.