threads / discuss / 10106

git-http-push / webDAV

Subject: git-http-push / webDAV

## tl;dr

8 messages between Oct 1, 2007 and Oct 9, 2007.

replies: 7people: 2as markdown or json

Thomas Pasch· Oct 1, 2007, 13:31 UTC · lore
Hello,

trying to set up a webDAV enabled http push git server (1.5.3.3) like it is described in

http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt

Tested the apache2 (2.2.6) DAV setup with cadaver (and tried the browser as well). With cadaver I could lock files, download and upload content.

However,
> git push -v upload master
Pushing to http://test@x.x.x.x/git/DepTrack.git/
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   d75dce3fe0e9ec5915feda5574f214bd432ccb14
    sending 89 objects
    done
Updating remote server info
UNLOCK HTTP error 400
Also tried:
> git-http-push --all --verbose http://x.x.x.x/git/DepTrack.git/ master
Getting pack list
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
'refs/heads/master': up-to-date
... and then tried to clone:
> git clone http://test@x.x.x.x/git/DepTrack.git

Initialized empty Git repository in /home/tpasch/tmp/tmp/DepTrack/.git/ Getting alternates list for http://test@x.x.x.x/git/DepTrack.git Getting pack list for http://test@x.x.x.x/git/DepTrack.git error: Unable to find d75dce3fe0e9ec5915feda5574f214bd432ccb14 under http://test@x.x.x.x/git/DepTrack.git Cannot obtain needed object d75dce3fe0e9ec5915feda5574f214bd432ccb14

Finally, tried a *non-empty* repo at the server:
> git clone --bare /home/tpasch/tmp/tmp/trunk DepTrack.git

Initialized empty Git repository in /data/git/DepTrack.git/ 22911 blocks

> cd DepTrack.git/
> git --bare update-server-info
> chmod a+x hooks/post-update
> chown -R wwwrun:www /data/git
... cloned:
> git clone http://test@x.x.x.x/git/DepTrack.git
Initialized empty Git repository in /home/tpasch/tmp/tmp/DepTrack/.git/
got d75dce3fe0e9ec5915feda5574f214bd432ccb14
walk d75dce3fe0e9ec5915feda5574f214bd432ccb14
got 8a459da1fb520cbc2534b87d3c0d8539fa010f45
got 31c3b20e1d7d7ca414a273fe80f4c49466250709
walk 31c3b20e1d7d7ca414a273fe80f4c49466250709
got ca647ac42188a8ed859260503abc41f98fd21be6
[...]
got 7e089ccc1819d4e69b228b3359690f685728248b
Checking 66 files out...
 100% (66/66) done
... then modified a file and pushed:
> git add test.txt
> git commit
> git push -v
Pushing to http://test@x.x.x.x/git/DepTrack.git
But this never returns. (Also tried:
> git-http-push --all --verbose http://x.x.x.x/git/DepTrack.git/ master
Getting pack list
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/master'
  from d75dce3fe0e9ec5915feda5574f214bd432ccb14
  to   07002e0423e803096eb07eb5c46651b00ed20725
    sending 3 objects
    done
Updating remote server info
UNLOCK HTTP error 400
)
Any suggestions?
Cheers,
Thomas

PS: This is how I initialized the repo:

> git --bare init
Initialized empty Git repository in /data/git/DepTrack.git/
> git --bare update-server-info
> chmod a+x hooks/post-update
> chown -R wwwrun:www /data/git
> /etc/init.d/apache2 restart
Eygene Ryabinkin· Oct 1, 2007, 15:54 UTC · re: Thomas Pasch · lore

Re: git-http-push / webDAV

Thomas, good day.
Mon, Oct 01, 2007 at 03:31:40PM +0200, Thomas Pasch wrote:
Show 25 quoted lines
> trying to set up a webDAV enabled http push
> git server (1.5.3.3) like it is described in
> 
> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
> 
> Tested the apache2 (2.2.6) DAV setup with
> cadaver (and tried the browser as well).
> With cadaver I could lock files, download
> and upload content.
> 
> However,
> 
> > git push -v upload master
> Pushing to http://test@x.x.x.x/git/DepTrack.git/
> Fetching remote heads...
>   refs/
>   refs/heads/
>   refs/tags/
> updating 'refs/heads/master'
>   from 0000000000000000000000000000000000000000
>   to   d75dce3fe0e9ec5915feda5574f214bd432ccb14
>     sending 89 objects
>     done
> Updating remote server info
> UNLOCK HTTP error 400

And how is your Apache configuration looks like? I used to make 2.2.4 work flawlessly with git. Perhaps I will get it a shot with the 2.2.6.

-- 
Eygene
Thomas Pasch· Oct 2, 2007, 08:49 UTC · re: Eygene Ryabinkin · lore

Re: git-http-push / webDAV

Dear Eygene,

I've investigated my problem a little further. The nasty 'UNLOCK HTTP error 400' has come from a proxy that doesn't accept webDAV stuff. Thus I unset the 'http_proxy' env variable (looks like cadaver hasn't cared...).

However, the main problem still remains. Using a non empty remote http repo, modifying and committing, then:

> git push -v
Pushing to http://test@x.x.x.x/git/git.git
still waits for a long time and finally:
Error: no DAV locking support on remote repo http://test@x.x.x.x/git/git.git
error: failed to push to 'http://test@x.x.x.x/git/git.git'
Interestingly apache2 access_log is:
[...]
x.x.x.x - test [02/Oct/2007:10:38:03 +0200] "GET /git/git.git/objects/pack/p
ack-563e2090185692c7d765775569a0ce986840fd17.pack HTTP/1.1" 200 15038211
"-" "gi
t/1.5.3.3"
x.x.x.x - test [02/Oct/2007:10:38:35 +0200] "GET /git/git.git/HEAD HTTP/1.1"
 200 23 "-" "curl/7.15.5 (i686-suse-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8d zli
b/1.2.3 libidn/0.6.8"
x.x.x.x - test [02/Oct/2007:10:39:27 +0200] "PROPFIND /git/git.git HTTP/1.1"
 301 319 "-" "git/1.5.3.3"
Hence a 'Moved Permanently' Error?!?

I'm using a SuSE 10.2 system here. Apache2 git configuration is in /etc/apache2/conf.d/git-dav.conf:

--->8--->8--->8--->8--->8--->8--->8--->8--->8 <IfModule mod_alias.c> Alias /git /data/git </IfModule>

DAVLockDB /var/lock/apache2/DAVLock
<Directory /data/git>
        # http://httpd.apache.org/docs/2.0/mod/mod_dav.html
        DAV On
        Options +Indexes
        AuthType Basic
        AuthName "git"
        AuthBasicProvider file
        AuthUserFile /etc/apache2/auth/userfile
        Require valid-user
        Order allow,deny
        Allow from all
</Directory>
--->8--->8--->8--->8--->8--->8--->8--->8--->8
Cheers,
Thomas
Eygene Ryabinkin wrote:
Show 7 quoted lines
> Thomas, good day.
>
> Mon, Oct 01, 2007 at 03:31:40PM +0200, Thomas Pasch wrote:
>> trying to set up a webDAV enabled http push
>> git server (1.5.3.3) like it is described in
>>
>>
http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
Show 25 quoted lines
>>
>> Tested the apache2 (2.2.6) DAV setup with
>> cadaver (and tried the browser as well).
>> With cadaver I could lock files, download
>> and upload content.
>>
>> However,
>>
>>> git push -v upload master
>> Pushing to http://test@x.x.x.x/git/DepTrack.git/
>> Fetching remote heads...
>>   refs/
>>   refs/heads/
>>   refs/tags/
>> updating 'refs/heads/master'
>>   from 0000000000000000000000000000000000000000
>>   to   d75dce3fe0e9ec5915feda5574f214bd432ccb14
>>     sending 89 objects
>>     done
>> Updating remote server info
>> UNLOCK HTTP error 400
>
> And how is your Apache configuration looks like?  I used to
> make 2.2.4 work flawlessly with git.  Perhaps I will get it
> a shot with the 2.2.6.
Eygene Ryabinkin· Oct 2, 2007, 08:54 UTC · re: Thomas Pasch · lore

Re: git-http-push / webDAV

Thomas, good day.
Tue, Oct 02, 2007 at 10:49:07AM +0200, Thomas Pasch wrote:
> I've investigated my problem a little further. The nasty
> 'UNLOCK HTTP error 400' has come from a proxy that
> doesn't accept webDAV stuff. Thus I unset the 'http_proxy'
> env variable (looks like cadaver hasn't cared...).
Yep, proxies can be tricky with the DAV stuff.
Show 10 quoted lines
> However, the main problem still remains. Using a non empty
> remote http repo, modifying and committing, then:
> 
> > git push -v
> Pushing to http://test@x.x.x.x/git/git.git
> 
> still waits for a long time and finally:
> 
> Error: no DAV locking support on remote repo http://test@x.x.x.x/git/git.git
> error: failed to push to 'http://test@x.x.x.x/git/git.git'

Try using URL with the slash at the end, like 'http://test@x.x.x.x/git/git.git/'. This should help.

-- 
Eygene
Thomas Pasch· Oct 2, 2007, 09:57 UTC · re: Eygene Ryabinkin · lore

Re: git-http-push / webDAV

Dear Eygene,
well, *somewhat* better with the trailing slash:
> echo "modified" >>grep.c
> git commit -a
Created commit e147e54: mod
 1 files changed, 1 insertions(+), 0 deletions(-)
> git push -v
Pushing to http://test@192.1.1.184/git/git.git/
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/master'
  from 34c6dbdef439f7cd93d3fe22493a3c1496ce96f7
  to   e147e54b14828fa2e88e88907e0ca4dc3d694448
    sending 3 objects
    done
Updating remote server info

There's no more error message. However, push has still not worked. If I try to check out the new HEAD:

> git clone http://test@192.1.1.184/git/git.git/
Initialized empty Git repository in /home/tpasch/tmp/git/.git/
Getting alternates list for http://test@192.1.1.184/git/git.git
Getting pack list for http://test@192.1.1.184/git/git.git
Getting index for pack 563e2090185692c7d765775569a0ce986840fd17
Getting pack 563e2090185692c7d765775569a0ce986840fd17
 which contains 3af9d3e08da868c3a7687ab38d72f4296a99005d
[...]
walk 24778e335a6450e34257a311d0bf4a12bdb3006c
walk 19b2860cba5742ab31fd682b80fefefac19be141
walk bf0c6e839c692142784caf07b523cd69442e57a5
walk e497ea2a9b6c378f01d092c210af20cbee762475
walk 8bc9a0c769ac1df7820f2dbf8f7b7d64835e3c68
walk e83c5163316f89bfbde7d9ab23ca2e25604af290
Getting alternates list for http://test@192.1.1.184/git/git.git
Getting pack list for http://test@192.1.1.184/git/git.git
error: Unable to find e147e54b14828fa2e88e88907e0ca4dc3d694448 under
http://test@192.1.1.184/git/git.git
Cannot obtain needed object e147e54b14828fa2e88e88907e0ca4dc3d694448
Cheers,
Thomas
Eygene Ryabinkin wrote:
Show 23 quoted lines
> Thomas, good day.
> 
> Tue, Oct 02, 2007 at 10:49:07AM +0200, Thomas Pasch wrote:
>> I've investigated my problem a little further. The nasty
>> 'UNLOCK HTTP error 400' has come from a proxy that
>> doesn't accept webDAV stuff. Thus I unset the 'http_proxy'
>> env variable (looks like cadaver hasn't cared...).
> 
> Yep, proxies can be tricky with the DAV stuff.
> 
>> However, the main problem still remains. Using a non empty
>> remote http repo, modifying and committing, then:
>>
>>> git push -v
>> Pushing to http://test@x.x.x.x/git/git.git
>>
>> still waits for a long time and finally:
>>
>> Error: no DAV locking support on remote repo http://test@x.x.x.x/git/git.git
>> error: failed to push to 'http://test@x.x.x.x/git/git.git'
> 
> Try using URL with the slash at the end, like
> 'http://test@x.x.x.x/git/git.git/'.  This should help.
Eygene Ryabinkin· Oct 2, 2007, 10:46 UTC · re: Thomas Pasch · lore

Re: git-http-push / webDAV

Thomas,
Tue, Oct 02, 2007 at 11:57:10AM +0200, Thomas Pasch wrote:
Show 20 quoted lines
> well, *somewhat* better with the trailing slash:
> 
> > echo "modified" >>grep.c
> > git commit -a
> Created commit e147e54: mod
>  1 files changed, 1 insertions(+), 0 deletions(-)
> > git push -v
> Pushing to http://test@192.1.1.184/git/git.git/
> Fetching remote heads...
>   refs/
>   refs/heads/
>   refs/tags/
> updating 'refs/heads/master'
>   from 34c6dbdef439f7cd93d3fe22493a3c1496ce96f7
>   to   e147e54b14828fa2e88e88907e0ca4dc3d694448
>     sending 3 objects
>     done
> Updating remote server info
> 
> There's no more error message.

OK, that's fine: the previous error was tied to the fact that when you're getting /git/git.git from the Web-server, it notices that it is a directory and redirects you to the /git/git.git/. But (IIRC) curl does not follow such redirections.

Show 22 quoted lines
> However, push has still
> not worked. If I try to check out the new HEAD:
> 
> > git clone http://test@192.1.1.184/git/git.git/
> Initialized empty Git repository in /home/tpasch/tmp/git/.git/
> Getting alternates list for http://test@192.1.1.184/git/git.git
> Getting pack list for http://test@192.1.1.184/git/git.git
> Getting index for pack 563e2090185692c7d765775569a0ce986840fd17
> Getting pack 563e2090185692c7d765775569a0ce986840fd17
>  which contains 3af9d3e08da868c3a7687ab38d72f4296a99005d
> [...]
> walk 24778e335a6450e34257a311d0bf4a12bdb3006c
> walk 19b2860cba5742ab31fd682b80fefefac19be141
> walk bf0c6e839c692142784caf07b523cd69442e57a5
> walk e497ea2a9b6c378f01d092c210af20cbee762475
> walk 8bc9a0c769ac1df7820f2dbf8f7b7d64835e3c68
> walk e83c5163316f89bfbde7d9ab23ca2e25604af290
> Getting alternates list for http://test@192.1.1.184/git/git.git
> Getting pack list for http://test@192.1.1.184/git/git.git
> error: Unable to find e147e54b14828fa2e88e88907e0ca4dc3d694448 under
> http://test@192.1.1.184/git/git.git
> Cannot obtain needed object e147e54b14828fa2e88e88907e0ca4dc3d694448

OK, I will try to do this on my server with 2.2.6. How big is your repository? Both size and commit number.

Thanks.
-- 
Eygene
Thomas Pasch· Oct 2, 2007, 11:15 UTC · re: Eygene Ryabinkin · lore

Re: git-http-push / webDAV

Dear Eygene,

I used a rather small test repo with only 2 or 3 commits.

The last tests I did with the a (current) git repo clone:
> git clone --bare git://git.kernel.org/pub/scm/git/git.git

e147e54b14828fa2e88e88907e0ca4dc3d694448 has indeed *not* found its way into the http push repo. For me it looks like that the push *first* updates refs/heads/master (successfully) but fails to transfer the object itself.

Perhaps it would be more graceful that the object is transfered *first* and then the remote tip is updated...

What version of git do you use?
Cheers,
Thomas
Eygene Ryabinkin wrote:
Show 56 quoted lines
> Thomas,
> 
> Tue, Oct 02, 2007 at 11:57:10AM +0200, Thomas Pasch wrote:
>> well, *somewhat* better with the trailing slash:
>>
>>> echo "modified" >>grep.c
>>> git commit -a
>> Created commit e147e54: mod
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>> git push -v
>> Pushing to http://test@x.x.x.x/git/git.git/
>> Fetching remote heads...
>>   refs/
>>   refs/heads/
>>   refs/tags/
>> updating 'refs/heads/master'
>>   from 34c6dbdef439f7cd93d3fe22493a3c1496ce96f7
>>   to   e147e54b14828fa2e88e88907e0ca4dc3d694448
>>     sending 3 objects
>>     done
>> Updating remote server info
>>
>> There's no more error message.
> 
> OK, that's fine: the previous error was tied to the fact that
> when you're getting /git/git.git from the Web-server, it notices
> that it is a directory and redirects you to the /git/git.git/.
> But (IIRC) curl does not follow such redirections.
> 
>> However, push has still
>> not worked. If I try to check out the new HEAD:
>>
>>> git clone http://test@x.x.x.x/git/git.git/
>> Initialized empty Git repository in /home/tpasch/tmp/git/.git/
>> Getting alternates list for http://test@x.x.x.x/git/git.git
>> Getting pack list for http://test@x.x.x.x/git/git.git
>> Getting index for pack 563e2090185692c7d765775569a0ce986840fd17
>> Getting pack 563e2090185692c7d765775569a0ce986840fd17
>>  which contains 3af9d3e08da868c3a7687ab38d72f4296a99005d
>> [...]
>> walk 24778e335a6450e34257a311d0bf4a12bdb3006c
>> walk 19b2860cba5742ab31fd682b80fefefac19be141
>> walk bf0c6e839c692142784caf07b523cd69442e57a5
>> walk e497ea2a9b6c378f01d092c210af20cbee762475
>> walk 8bc9a0c769ac1df7820f2dbf8f7b7d64835e3c68
>> walk e83c5163316f89bfbde7d9ab23ca2e25604af290
>> Getting alternates list for http://test@x.x.x.x/git/git.git
>> Getting pack list for http://test@x.x.x.x/git/git.git
>> error: Unable to find e147e54b14828fa2e88e88907e0ca4dc3d694448 under
>> http://test@x.x.x.x/git/git.git
>> Cannot obtain needed object e147e54b14828fa2e88e88907e0ca4dc3d694448
> 
> OK, I will try to do this on my server with 2.2.6.  How big
> is your repository?  Both size and commit number.
> 
> Thanks.
Thomas Pasch· Oct 9, 2007, 09:37 UTC · re: Thomas Pasch · lore

Re: git-http-push / webDAV

Dear Eygene,

I tried all this on a Gentoo x86_64 machine. No problems! Git on http/webDAV is just working fine.

I also retried all this on a SuSE 10.3 system. Same problems as before. Thus it could have to do with the (general) configuration of the SuSE system.

I still feel that the behaviour of git-push / git-http-push is *not* approbiate. It should indicate a problem if it was not able to upload a new object to the remote server. Just saying

>>>     sending 3 objects
>>>     done

instead of indicating a problem is not what a user expects. This particulary true if the objects are not created on the server as it seems to be in my case.

Cheers,
Thomas
Thomas Pasch wrote:
Show 82 quoted lines
> Dear Eygene,
> 
> I used a rather small test repo with only 2 or 3
> commits.
> 
> The last tests I did with the a (current) git repo clone:
> 
>> git clone --bare git://git.kernel.org/pub/scm/git/git.git
> 
> e147e54b14828fa2e88e88907e0ca4dc3d694448 has indeed *not*
> found its way into the http push repo. For me it looks
> like that the push *first* updates refs/heads/master
> (successfully) but fails to transfer the object itself.
> 
> Perhaps it would be more graceful that the object is
> transfered *first* and then the remote tip is updated...
> 
> What version of git do you use?
> 
> Cheers,
> 
> Thomas
> 
> Eygene Ryabinkin wrote:
>> Thomas,
>>
>> Tue, Oct 02, 2007 at 11:57:10AM +0200, Thomas Pasch wrote:
>>> well, *somewhat* better with the trailing slash:
>>>
>>>> echo "modified" >>grep.c
>>>> git commit -a
>>> Created commit e147e54: mod
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>> git push -v
>>> Pushing to http://test@x.x.x.x/git/git.git/
>>> Fetching remote heads...
>>>   refs/
>>>   refs/heads/
>>>   refs/tags/
>>> updating 'refs/heads/master'
>>>   from 34c6dbdef439f7cd93d3fe22493a3c1496ce96f7
>>>   to   e147e54b14828fa2e88e88907e0ca4dc3d694448
>>>     sending 3 objects
>>>     done
>>> Updating remote server info
>>>
>>> There's no more error message.
>> OK, that's fine: the previous error was tied to the fact that
>> when you're getting /git/git.git from the Web-server, it notices
>> that it is a directory and redirects you to the /git/git.git/.
>> But (IIRC) curl does not follow such redirections.
>>
>>> However, push has still
>>> not worked. If I try to check out the new HEAD:
>>>
>>>> git clone http://test@x.x.x.x/git/git.git/
>>> Initialized empty Git repository in /home/tpasch/tmp/git/.git/
>>> Getting alternates list for http://test@x.x.x.x/git/git.git
>>> Getting pack list for http://test@x.x.x.x/git/git.git
>>> Getting index for pack 563e2090185692c7d765775569a0ce986840fd17
>>> Getting pack 563e2090185692c7d765775569a0ce986840fd17
>>>  which contains 3af9d3e08da868c3a7687ab38d72f4296a99005d
>>> [...]
>>> walk 24778e335a6450e34257a311d0bf4a12bdb3006c
>>> walk 19b2860cba5742ab31fd682b80fefefac19be141
>>> walk bf0c6e839c692142784caf07b523cd69442e57a5
>>> walk e497ea2a9b6c378f01d092c210af20cbee762475
>>> walk 8bc9a0c769ac1df7820f2dbf8f7b7d64835e3c68
>>> walk e83c5163316f89bfbde7d9ab23ca2e25604af290
>>> Getting alternates list for http://test@x.x.x.x/git/git.git
>>> Getting pack list for http://test@x.x.x.x/git/git.git
>>> error: Unable to find e147e54b14828fa2e88e88907e0ca4dc3d694448 under
>>> http://test@x.x.x.x/git/git.git
>>> Cannot obtain needed object e147e54b14828fa2e88e88907e0ca4dc3d694448
>> OK, I will try to do this on my server with 2.2.6.  How big
>> is your repository?  Both size and commit number.
>>
>> Thanks.
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Mit freundlichen Grüßen / Kind regards
Thomas Pasch

--------------------------------------------------------------------
Jentro Technologies GmbH
Thomas Pasch
Entwicklung
--------------------------------------------------------------------
Rosenheimer Strasse 145e, D-81671 Munich, Germany
N 48°07'19", E 11°36'18"
http://www.jentro.com
Managing Directors: Dr. Hans-Hendrik Puvogel, Erno Hempel
Trade register Munich HRB 148653
--------------------------------------------------------------------
Tel. +49 89 189 169 80
Fax +49 89 189 169 99
thomas.pasch@jentro.com
--------------------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or
may otherwise be legally privileged. It is intended for the named
recipient only. If you have received it in error, please notify us
immediately by reply or by calling the telephone number above and
delete this message and all its attachments without any use or
further distribution of its contents. Please note that any
unauthorised review, copying, disclosing or otherwise making use of
the information is strictly prohibited. Thank you.
--------------------------------------------------------------------

← back to recent threads