threads / discuss / 18759

git over http not re-authenticating after 301 redirect?

Subject: git over http not re-authenticating after 301 redirect?

## tl;dr

4 messages between Apr 7, 2009 and Apr 9, 2009.

replies: 3people: 3as markdown or json

Paul Vincent Craven· Apr 7, 2009, 02:14 UTC · lore
When I do a git-push from a repository I set up, I get:
craven@craven-desktop:~/docs$ git push
Unable to create branch path
http://username:password@server.simpson.edu/my_repo.git/info
Error: cannot lock existing info/refs
error: failed to push some refs to
'http://username:password@server.simpson.edu/my_repo.git/'

The web log shows: 10.1.21.232 - username [06/Apr/2009:21:24:04 -0500] "PROPFIND /my_repo.git/ HTTP/1.1" 207 559 "-" "git/1.5.6.3" 10.1.21.232 - username [06/Apr/2009:21:24:04 -0500] "HEAD /my_repo.git/info/refs HTTP/1.1" 200 - "-" "git/1.5.6.3" 10.1.21.232 - username [06/Apr/2009:21:24:04 -0500] "HEAD /my_repo.git/objects/info/packs HTTP/1.1" 200 - "-" "git/1.5.6.3" 10.1.21.232 - username [06/Apr/2009:21:24:04 -0500] "MKCOL /my_repo.git/info HTTP/1.1" 301 383 "-" "git/1.5.6.3" 10.1.21.232 - - [06/Apr/2009:21:24:04 -0500] "MKCOL /my_repo.git/info/ HTTP/1.1" 401 536 "-" "git/1.5.6.3"

Note that after the 301 redirect, I don't seem to have a username sent anymore. I'm not sure this is the issue, but is seems like a possibility.

I have the same issue on other computers that have cloned the repository.
The /my_repo.git/info/ directory does exist.

I thought I had this working the first day I set it up, but now it no longer does. If someone could point me in the correct direction, I'd appreciate it.

-- 
Paul Vincent Craven
Martin Storsjö· Apr 7, 2009, 07:42 UTC · re: Paul Vincent Craven · lore

Re: git over http not re-authenticating after 301 redirect?

Hi Paul,
On Mon, 6 Apr 2009, Paul Vincent Craven wrote:
Show 11 quoted lines
> Note that after the 301 redirect, I don't seem to have a username sent
> anymore. I'm not sure this is the issue, but is seems like a
> possibility.
> 
> I have the same issue on other computers that have cloned the repository.
> 
> The /my_repo.git/info/ directory does exist.
> 
> I thought I had this working the first day I set it up, but now it no
> longer does. If someone could point me in the correct direction, I'd
> appreciate it.

It's a long shot, but try see if you can upgrade to a newer version of libcurl; I think I saw some issue like this when I was experimenting with different http auth setups last week, that was solved by using newer versions...

// Martin
Paul Vincent Craven· Apr 7, 2009, 19:25 UTC · re: Martin Storsjö · lore

Re: git over http not re-authenticating after 301 redirect?

On Tue, Apr 7, 2009 at 2:42 AM, Martin Storsjö <martin@martin.st> wrote:
> It's a long shot, but try see if you can upgrade to a newer version of
> libcurl; I think I saw some issue like this when I was experimenting with
> different http auth setups last week, that was solved by using newer
> versions...

No luck, but thanks for the suggestion. Updating to the March 3 build of curl 7.19.4 yielded the same results.

-- 
Paul Vincent Craven
http://www.cravenfamily.com
Tay Ray Chuan· Apr 9, 2009, 17:20 UTC · re: Paul Vincent Craven · lore

Re: git over http not re-authenticating after 301 redirect?

Hi,

On Tue, Apr 7, 2009 at 10:14 AM, Paul Vincent Craven <paul@cravenfamily.com> wrote:

> Note that after the 301 redirect, I don't seem to have a username sent
> anymore. I'm not sure this is the issue, but is seems like a
> possibility.

could you check what version of git you have? This should have been fixed in 1.6.1.1.

-- 
Cheers,
Ray Chuan

← back to recent threads