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
Scott Chacon <schacon@gmail.com>
Date
Apr 2, 2010, 15:43 UTC
Message-ID
<y2rd411cc4a1004020843we196537ak35ab6006ce28fefe@mail.gmail.com>
In-Reply-To
<7veiiymk75.fsf@alter.siamese.dyndns.org>
Hey,
On Thu, Apr 1, 2010 at 11:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> An obvious enhancement could be to make "http://user@host.com/repo.git"
> ask for password lazily.  Then such a URL can be used even for an access
> that does not need authentication and the user does not have to prompted
> for the password each time, which was what you wanted to really solve, no?
>
> Actually that could not just be an enhancement, but might be a better
> alternative solution to the problem, but I haven't thought things
> through.

Actually, what I want to do is be able to show a single URL that will work for everyone - both read-only and read-write users, so I much prefer the way I wrote the patch. This way, GitHub and kernel.org and whomever else can just publish the one url and it will prompt if they need auth for some reason, and just work if not.

I do however agree that if someone _does_ put their username in the url that it should only prompt for the password if it 401s. That should probably be a separate patch, though.

Scott
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “Prompt for a username when an HTTP request 401s”
  1. Prompt for a username when an HTTP request 401sScott Chacon, Apr 1, 2010
  2. Junio C HamanoApr 2, 2010
  3. Scott ChaconApr 2, 2010
  4. Junio C HamanoApr 2, 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.