Skip to contentSkip to conversation

git via http problem

DISCUSSION Aleksey Egorov 2 participants 5 messages Jun 15, 2016 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Good day
I have installed apache2, Webdav and git-core on my Debian.
I added next information to the apache conf
Alias /linter.git /var/www/linter.git
<Location /linter.git>
DAV On
AuthType Basic
Authname "localhost"
AuthUserFile /etc/apache2/users/pwd
Require valid-user
</Location>
pwd file was created by htpasswd, wich contain user test and password test. my home/.netrc file contains
machine localhost
login test
password test
And then when I type
git push upload master
I see next errors
error: Cannot access URL http://localhost/linter.git/, return code 22
error: failed to push some refs to 'http://localhost/linter.git/'
In browaser all is ok, when I type http://localhost/linter.git/, user test and password test, it shows directory on the server.
If I change apache conf to
Alias /linter.git /var/www/linter.git
<Location /linter.git>
DAV On
AuthType Basic
Authname "localhost"
</Location>
git starts normal:
git push upload master
Fetching remote heads...
refs/
refs/heads/
refs/tags/
updating 'refs/heads/master'
from 0000000000000000000000000000000000000000
to aa36be4c3e46e619f73faa0cea071688cb380d25

What is the problem can be?

#1 lore raw

Hi,

Quoted 7 lines · Aleksey Egorov

If I change apache conf to
     Alias /linter.git /var/www/linter.git
<Location /linter.git>
DAV On
AuthType Basic
Authname "localhost"
</Location>

I noticed that you left out AuthUserFile here.

Could it be that you didn't load mod_authn_file? (wild guess)

Also, what version of git are you running? I'm guessing it's an authentication problem.

Signature · 2 lines
Cheers,
Ray Chuan

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

I'm using git-core 1:1.5.6.5-3+lenny3.2
I can see list of files using cadaver:
cadaver http://test@localhost/linter.git
Authentication required for localhost on server `localhost':
Username: test
Password:
dav:/linter.git/> ls
Listing collection `/linter.git/': succeeded.

Coll:   branches                               0  Окт 25 12:45
Coll:   hooks                                  0  Окт 25 12:45
Coll:   info                                   0  Окт 25 12:45
Coll:   objects                                0  Окт 25 12:45
Coll:   refs                                   0  Окт 25 12:45
        HEAD                                  23  Окт 25 12:45
        config                                66  Окт 25 12:45
        description                           58  Окт 25 12:45

dav:/linter.git/> quit
Connection to `localhost' closed.

In /etc/apache2/mods-enabled I see @authn_file.load with the text
LoadModule authn_file_module /usr/lib/apache2/modules/mod_authn_file.so

Mon, 25 Oct 2010 20:39:44 +0800 письмо от Tay Ray Chuan <[email protected]>:

Quoted 16 lines

Hi,

Quoted 7 lines · Aleksey Egorov

If I change apache conf to
? ? ?Alias /linter.git /var/www/linter.git
<Location /linter.git>
DAV On
AuthType Basic
Authname "localhost"
</Location>

I noticed that you left out AuthUserFile here.
Could it be that you didn't load mod_authn_file? (wild guess) Also, what version of git are you running? I'm guessing it's an authentication problem.

Signature · 2 lines
Cheers,
Ray Chuan
#4 lore raw

Hi,

2010/10/25 Алексей Егоров <[email protected]>:

Quoted 2 lines

I'm using git-core 1:1.5.6.5-3+lenny3.2
I can see list of files using cadaver:

Probably a problem with git. Could you try updating your git installation?

Signature · 2 lines
Cheers,
Ray Chuan

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

I installed git-core git/1.7.1 from Squeeze branch compilled for lenny. Now when i type git push upload master

it request password twice (I entered right password test and test) Password:
Password:

and then shows:
Fetching remote heads...
refs/
refs/heads/
refs/tags/
updating 'refs/heads/master'
from 0000000000000000000000000000000000000000
to aa36be4c3e46e619f73faa0cea071688cb380d25

    sending 183322 objects

LOCK HTTP error 412
Unable to refresh lock for http://test@localhost/linter.git/info/refs
LOCK HTTP error 412
Unable to refresh lock for http://test@localhost/linter.git/info/refs
LOCK HTTP error 412
Unable to refresh lock for http://test@localhost/linter.git/refs/heads/master
LOCK HTTP error 412
Unable to refresh lock for http://test@localhost/linter.git/info/refs
LOCK HTTP error 412
Unable to refresh lock for http://test@localhost/linter.git/refs/heads/master
UNLOCK HTTP error 400
LOCK HTTP error 412
Unable to refresh lock for http://test@localhost/linter.git/info/refs
Updating remote server info
UNLOCK HTTP error 400
fatal: git-http-push failed

What is the problem can be?

Mon, 25 Oct 2010 22:20:05 +0800 письмо от Tay Ray Chuan <[email protected]>:

Quoted 8 lines

Hi,
2010/10/25 Алексей Егоров <[email protected]>:

Quoted 2 lines

I'm using git-core 1:1.5.6.5-3+lenny3.2
I can see list of files using cadaver:

Probably a problem with git. Could you try updating your git installation?

Signature · 2 lines
Cheers,
Ray Chuan