threads / discuss / 2388

Notes on http-push

Subject: Notes on http-push

## tl;dr

5 messages between Nov 7, 2005 and Nov 8, 2005.

replies: 4people: 3as markdown or json

Johannes Schindelin· Nov 7, 2005, 18:34 UTC · lore
Hi,
two little things I noticed while playing around with http-push:
- if you init your test by git-clone'ing from a http repo, be sure to
	add a slash to the URL, else git-push will tell you erroneously
	that the server does not do DAV locking. (Probably http-push.c 
	should be fixed to add the slash when needed.)
- if you execute "git push origin", it does not do anything (correctly?),
	if there is no "Push:" line in .git/remotes/origin (which is the
	default after cloning). Try "git push origin master". (Probably
	http-push or git-push should say something about it, not
	just quit silently.)

If you want to play with it yourself: A minimal setup using Apache needs something like this in httpd.conf:

--- snip ---
<Location /gits>
  DAV on
  Deny From *
  Allow From 192.168.0.
</Location>

DAVLockDB "/usr/local/apache2/temp/DAV.lock" --- snap ---

Make sure that your www user has write permissions on <HTDOCS>/gits and on the DAV lock.

Have fun, Dscho

Nick Hengeveld· Nov 7, 2005, 19:07 UTC · re: Johannes Schindelin · lore

Re: Notes on http-push

On Mon, Nov 07, 2005 at 07:34:34PM +0100, Johannes Schindelin wrote:
> - if you init your test by git-clone'ing from a http repo, be sure to
> 	add a slash to the URL, else git-push will tell you erroneously
> 	that the server does not do DAV locking. (Probably http-push.c 
> 	should be fixed to add the slash when needed.)

In the -fetch counterparts, the trailing slash is added by git-fetch.sh, does this belong in the get_remote_url() function in git-parse-remote.sh? I've only pushed with DAV, so I'm not sure whether that would break anything else.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
Nick Hengeveld· Nov 8, 2005, 08:46 UTC · re: Johannes Schindelin · lore

Re: Notes on http-push

On Mon, Nov 07, 2005 at 07:34:34PM +0100, Johannes Schindelin wrote:
> If you want to play with it yourself: A minimal setup using Apache needs 
> something like this in httpd.conf:

In the interest of testing push against another DAV server implementation, I tried using Subversion's Apache DAV/DeltaV module. It works if you enable autoversioning and authentication, which makes for a slightly different minimal Apache setup:

LoadModule dav_module        modules/mod_dav.so
LoadModule dav_svn_module    modules/mod_dav_svn.so
LoadModule authz_svn_module  modules/mod_authz_svn.so
<Location /svn>
    DAV svn
    SVNPath /path/to/svn/repo
    SVNAutoversioning on
    AuthName "Subversion Repo"
    AuthType Basic
    AuthUserFile ....
    AuthGroupFile ....
    <LimitExcept GET>
        require ....
    </LimitExcept>
</Location>

While it's kind of useless to place immutable objects under version control, it is sort of an interesting side effect that all the meta files will have a history.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
Junio C Hamano· Nov 8, 2005, 08:59 UTC · re: Nick Hengeveld · lore

Re: Notes on http-push

Nick Hengeveld <nickh@reactrix.com> writes:
Show 8 quoted lines
> In the interest of testing push against another DAV server
> implementation, I tried using Subversion's Apache DAV/DeltaV module.
> It works if you enable autoversioning and authentication, which makes
> for a slightly different minimal Apache setup:
>...
> While it's kind of useless to place immutable objects under version
> control, it is sort of an interesting side effect that all the meta
> files will have a history.

Pushing git commit history into SVN server --- this must be a sick joke ;-). Can you pull over http from there?

But seriously, it is good that you are trying out talking with different servers. Thanks.

I'm planning to push out the final bit to make git-push aware of http-push tonight or tomorrow.

Nick Hengeveld· Nov 8, 2005, 15:50 UTC · re: Junio C Hamano · lore

Re: Notes on http-push

On Tue, Nov 08, 2005 at 12:59:45AM -0800, Junio C Hamano wrote:
> Pushing git commit history into SVN server --- this must be a
> sick joke ;-).  Can you pull over http from there?

I rather felt like I'd violated some law of nature or something. Pulls work fine from there - it's feasible to put an entire GIT repo behind a DAV server, assuming there's a way to run all the non-push/pull git commands. If you're using mod_dav_fs, that could just mean having shell/filesystem access to the server. If you're using mod_dav_svn, it could either mean using something like Davfs2 or putting intelligence into the git commands to handle GIT_DIR=http://dav.serv.er/path by using HTTP GET/PUT instead of read/write system calls.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

← back to recent threads