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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Stenberg <daniel@xxxxxxx> wrote:
> On Fri, 19 Mar 2010, Tay Ray Chuan wrote:
>>> When an HTTP request returns a 401, Git will currently fail with a  
>>> confusing message saying that it got a 401.
>>
>> 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.
>
> That's correct. It should hide the 401 in the sense that it should try to 
> continue and do the correct authentication procedure and only if that 
> fails it should end up with an actual 401 end result.

If the URL didn't contain a username, and the server returns a 401,
Git just aborts with an error.

What Scott is trying to do here is teach Git to request a
username/password if there was no username in the URL and
authentication is required by the server.

In the case of GitHub, this means they can advertise one http:// URL
for the repository.  Anonymous fetch just works, and using that same
URL to push will ask for your username/password, and then complete.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]