From: Clemens Buchacher <drizzd@aon.at>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Subject: Re: Cannot clone the git repository shared over http with authorization.
Date: Tue, 10 Apr 2012 11:53:38 +0200 [thread overview]
Message-ID: <1334051620-18044-1-git-send-email-drizzd@aon.at> (raw)
In-Reply-To: <20120402083115.GA2235@sigill.intra.peff.net>
On Mon, Apr 02, 2012 at 04:31:15AM -0400, Jeff King wrote:
> On Sun, Apr 01, 2012 at 09:45:36PM +0200, Clemens Buchacher wrote:
>
> > So far I figured out that setting 'git config http.maxRequests 1' fixes
> > the problem as well. Looking at the output with GIT_CURL_VERBOSE=1 set,
> > it seems that some GET requests use the credentials, while others do
> > not. My guess is that the CURLOPT_USERPWD option does not apply to all
> > threads.
>
> Yes, that is exactly it. Furthermore, the multi-fetch code paths used by
> the http walker do not have the magic "notice a 401 and retry". I think
> something like this should fix it (it passes your tests),
> which is basically just double-checking that we set CURLOPT_USERPWD
> whenever we get a slot (I wish there was some way of asking "does this
> curl handle have USERPWD already set?", but I couldn't fine one).
I think this is the way to go. I am sending the updated patch for the test
(much of my changes were unnecessary), and your fix on top.
[PATCH 1/2] http auth fails with multiple curl handles
[PATCH 2/2] fix http auth with multiple curl handles
Clemens
next prev parent reply other threads:[~2012-04-10 10:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-01 18:48 Cannot clone the git repository shared over http with authorization Artur R. Czechowski
2012-04-01 19:45 ` Clemens Buchacher
2012-04-01 20:53 ` Clemens Buchacher
2012-04-02 8:31 ` Jeff King
2012-04-10 9:53 ` Clemens Buchacher [this message]
2012-04-10 9:53 ` [PATCH 1/2] http auth fails with multiple curl handles Clemens Buchacher
2012-04-10 9:53 ` [PATCH 2/2] fix http auth " Clemens Buchacher
2012-04-12 7:09 ` Jeff King
2012-04-12 22:50 ` Junio C Hamano
2012-04-13 6:16 ` Jeff King
2012-04-13 6:18 ` [PATCH 1/2] http: clean up leak in init_curl_http_auth Jeff King
2012-04-13 6:19 ` [PATCH 2/2] http: use newer curl options for setting credentials Jeff King
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=1334051620-18044-1-git-send-email-drizzd@aon.at \
--to=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).