From: "Shawn O. Pearce" <spearce@spearce.org>
To: Daniel Stenberg <daniel@haxx.se>
Cc: Tay Ray Chuan <rctay89@gmail.com>,
Scott Chacon <schacon@gmail.com>, git list <git@vger.kernel.org>
Subject: Re: [PATCH] Prompt for a username when an HTTP request 401s
Date: Fri, 19 Mar 2010 07:16:43 -0700 [thread overview]
Message-ID: <20100319141643.GA16211@spearce.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1003191033022.15750@tvnag.unkk.fr>
Daniel Stenberg <daniel@haxx.se> 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.
next prev parent reply other threads:[~2010-03-19 14:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 3:41 [PATCH] Prompt for a username when an HTTP request 401s Scott Chacon
2010-03-19 9:13 ` Tay Ray Chuan
2010-03-19 9:34 ` Daniel Stenberg
2010-03-19 14:16 ` Shawn O. Pearce [this message]
2010-03-19 14:32 ` Shawn O. Pearce
2010-03-19 19:08 ` Scott Chacon
2010-03-19 19:09 ` Shawn O. Pearce
2010-03-19 19:27 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2010-04-01 22:14 Scott Chacon
2010-04-02 6:39 ` Junio C Hamano
2010-04-02 15:43 ` Scott Chacon
2010-04-02 16:11 ` Junio C Hamano
2010-04-01 20:29 Scott Chacon
2010-04-01 21:30 ` Junio C Hamano
2010-04-01 22:06 ` Scott Chacon
2010-03-19 19:17 Scott Chacon
2010-03-18 18:57 Scott Chacon
2010-03-18 19:03 ` Shawn O. Pearce
2010-03-18 23:53 ` René Scharfe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100319141643.GA16211@spearce.org \
--to=spearce@spearce.org \
--cc=daniel@haxx.se \
--cc=git@vger.kernel.org \
--cc=rctay89@gmail.com \
--cc=schacon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).