git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Paul J R <me@pjr.cc>
Cc: git@vger.kernel.org
Subject: Re: git clone over http with basic auth bug?
Date: Sat, 22 Sep 2012 01:09:35 -0400	[thread overview]
Message-ID: <20120922050935.GA4542@sigill.intra.peff.net> (raw)
In-Reply-To: <505CFA42.9090504@pjr.cc>

On Sat, Sep 22, 2012 at 09:37:38AM +1000, Paul J R wrote:

> Im not sure if this is a bug, or just "as implemented". But when
> cloning from a repo sitting on a web site that uses basic auth, the
> git client appears to forget its authentication info and ignores the
> 401's the server is sending back. It appears to initially login and
> get refs and HEAD ok, but after that it never authenticates again.
> Using a .netrc file this will work (or a url of the form
> http://user:pass@host though http://user@host wont), but i'm curious
> if theres a way of doing this without having to expose the password
> in some way?
> 
> Im using git 1.7.9.5 and when i clone i get the following:
> [...]

>From your logs, it looks like you are using the "dumb" http protocol
(wherein the server does not have to understand git at all). In this
protocol, we end up making multiple simultaneous requests for objects
with different curl handles. We had a bug where not all handles are told
about the credential (but it doesn't always happen; it depends on the
exact pattern of requests).

This was fixed by dfa1725 (fix http auth with multiple curl handles,
2012-04-10), which is in git v1.7.10.2 and higher.

Can you try upgrading to see if that fixes your problem?

-Peff

  reply	other threads:[~2012-09-22  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 23:37 git clone over http with basic auth bug? Paul J R
2012-09-22  5:09 ` Jeff King [this message]
2012-09-22 20:43   ` Paul J R
2012-09-23 17:21     ` Shawn Pearce

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=20120922050935.GA4542@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=me@pjr.cc \
    /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).