git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Chacon <schacon@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git list <git@vger.kernel.org>, "Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH] Prompt for a username when an HTTP request 401s
Date: Thu, 1 Apr 2010 15:06:47 -0700	[thread overview]
Message-ID: <h2vd411cc4a1004011506p4d2db46bjafbe22f702b0f869@mail.gmail.com> (raw)
In-Reply-To: <7v39zeoo70.fsf@alter.siamese.dyndns.org>

Hey,

On Thu, Apr 1, 2010 at 2:30 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Also, earlier I said "sometimes OK", because I don't know if it always OK
> for us to get 401 and continue.  If the end user got a 401 and then does
> not have a good username or password (e.g. he realizes that the URL he
> accessed was incorrect), he used to see "you are not allowed to access
> this repository" with a clean failure, but now he would have to get out of
> "who are you?" interaction (and how would he do that?).  Would that be a
> problem?

They did not get a clean failure, it looks like this:

--
$ git clone http://github.dev/defunkt/ambition.git
Initialized empty Git repository in /private/tmp/svn/ambition/.git/
error: The requested URL returned error: 401 while accessing
http://github.dev/defunkt/ambition.git/info/refs

fatal: HTTP request failed
--

"401 while accessing X, HTTP request failed" is not really a clean
failure.  Most people don't know what a 401 is.  With this patch, if
they get prompted for a user/pass on 401 and it still fails, they see
this:

--
$  ~/bin/git clone http://github.dev/defunkt/ambition.git
Initialized empty Git repository in /private/tmp/svn/ambition/.git/
Username:
Password:
fatal: Authentication failed
--

I think "Authentication failed" is a bit cleaner.  I'm sending another
patch with the comment format change and message update.

Scott

  reply	other threads:[~2010-04-01 22:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 20:29 [PATCH] Prompt for a username when an HTTP request 401s Scott Chacon
2010-04-01 21:30 ` Junio C Hamano
2010-04-01 22:06   ` Scott Chacon [this message]
  -- 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-03-19 19:17 Scott Chacon
2010-03-19  3:41 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
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
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=h2vd411cc4a1004011506p4d2db46bjafbe22f702b0f869@mail.gmail.com \
    --to=schacon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /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).