Skip to contentSkip to conversation

git and "dumb protocols"

DISCUSSION Matthieu Moy 6 participants 10 messages Aug 11, 2016

lore
Share & tools
lore
#4 lore raw
In reply to Matthieu Moy
Quoted 5 lines · Matthieu Moy

I'll probably do, but my concern is broader than that. I like the ability to use almost any webhosting service for my revision control. GNU Arch was quite good at that, bzr is also (doesn't support webdav very well yet, but read-only-HTTP, sftp and ftp are there), so I'd like git to do the same.

Well, git can fetch (read) via http, https, ftp, sftp, rsync, git, ssh+git; it can push via http(s) with WebDAV, and ssh+git (ssh+git meaning via ssh, with git installed on the server side).

BTW. rsync is considered obsolete, and suitable only for initial cloning, perhaps.

Signature · 3 lines
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
#2 lore raw
In reply to Matthieu Moy

Hi,

Dear diary, on Thu, Nov 02, 2006 at 11:36:07AM CET, I got a letter where Matthieu Moy <[email protected]> said that...

Quoted 2 lines

Is it possible with git to push to a server on which git is not installed, and if so, how?

yes, you can push using HTTP DAV - just push to an HTTP URL; make sure
you have git-http-push compiled, it is sometimes not compiled because it unfortunately adds dependencies on couple of more libraries.

Beware that this is inherently not safe for anonymous push access,
since malicious client with write access can destroy the repository. You will want to protect write access to the repository by .htaccess file.

I think a patch that would add support for pushing over sftp or some
other dumb protocol would be welcome. One problem is with proper locking of ref updates (not sure how well would sftp cope with that), another is that you will need to do git-update-server-info's job on the server side.

If you already have SSH access to the server, why not compile Git
there and install it to your $HOME, though?

Signature · 4 lines
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
#7 lore raw

Hi,

Quoted 2 lines · Petr Baudis

If you already have SSH access to the server, why not compile Git
there and install it to your $HOME, though?

Could be a number of reasons:

- no compiler
- quota issues
- missing support for that particular platform
- time constraints
- etc

Happened to me.

Ciao,
Dscho

#5 lore raw
In reply to Matthieu Moy
Quoted 5 lines · Matthieu Moy

I'll probably do, but my concern is broader than that. I like the ability to use almost any webhosting service for my revision control. GNU Arch was quite good at that, bzr is also (doesn't support webdav very well yet, but read-only-HTTP, sftp and ftp are there), so I'd like git to do the same.

You should be able to put together the repository you want hosted locally and use any webhosting service updating procedure to update what's hosted. AFAIK, git.kernel.org is a completely dumb mirror of master.kernel.org, working like that.

The main thing is that you want "objects" to be updated before "refs", and you don't want to do any git operations during the mirroring. But it's not even that important, so long as whenever you leave the mirror for a while, it matches some final state (with respect to git) of the master.

What you actually care about the git-native stuff for is preparing the master image, so that you don't have random cruft from your working repository, and then you just want it to mirror efficiently.

-Daniel

#3 lore raw
In reply to Petr Baudis
Quoted 3 lines · Petr Baudis

yes, you can push using HTTP DAV - just push to an HTTP URL; make sure
you have git-http-push compiled, it is sometimes not compiled because it unfortunately adds dependencies on couple of more libraries.

That's great. I don't need this right now, but having worked behind a firewall + proxy, I know how appreciable it is to push with DAV ;-).

Quoted 5 lines

I think a patch that would add support for pushing over sftp or some
other dumb protocol would be welcome. One problem is with proper locking of ref updates (not sure how well would sftp cope with that), another is that you will need to do git-update-server-info's job on the server side.

It should be possible (but not implemented AAUI) also to generate the additional info of git-update-server-info on the client, isn't it?

Quoted 2 lines

If you already have SSH access to the server, why not compile Git
there and install it to your $HOME, though?

I'll probably do, but my concern is broader than that. I like the ability to use almost any webhosting service for my revision control. GNU Arch was quite good at that, bzr is also (doesn't support webdav very well yet, but read-only-HTTP, sftp and ftp are there), so I'd like git to do the same.

And yes, there are tons of reasons not to install git on the server. In particular, the fact that I'm not root there, and too lazy to do more than "aptitude install git" with pleasure ;-).

#9 lore raw
In reply to Matthieu Moy
Quoted 8 lines · Matthieu Moy

Hi,

Is it possible with git to push to a server on which git is not installed, and if so, how?

Quoted 1 line

From the man page of git, sftp doesn't seem supported, and ssh://

complains about git-receive-pack not being installed on the server.

Quoted 7 lines

The man page documents a rsync:// protocol, but

$ git push rsync://some.location.com/
fatal: I don't handle protocol 'rsync'
$ 

What am I missing?

To push only makes sense when you have git installed at the receiving end. It is the interaction between the source and destination git instances which renders the push an effective optimisation.

If you are using rsync, then you can just rsync the whole repository out and what is out there is as valid as your own copy. Of course a repack will make the whole thing changed and you'll pay on the next rsync.

git is designed with this use model involved, you 'git update-server-info' then rsync the repo in-toto out to your http server and it can be fetch'ed from (all be it less efficiently) by another client. All without any requirement for anything other than passive data delivery at the server end. Great if you don't have shell access etc.

-apw

#8 lore raw
In reply to Johannes Schindelin

Hi,

Dear diary, on Thu, Nov 02, 2006 at 11:57:16AM CET, I got a letter where Johannes Schindelin <[email protected]> said that...

Quoted 9 lines · Petr Baudis
Quoted 3 lines

If you already have SSH access to the server, why not compile Git
there and install it to your $HOME, though?

Could be a number of reasons:

- no compiler
- quota issues

good points.

Quoted 1 line

- missing support for that particular platform

If not with conjunction with the following ("- time constraints"), it
would be superb to add support for that particular platform. :^)

Signature · 4 lines
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
#0 lore raw

Hi,

Is it possible with git to push to a server on which git is not installed, and if so, how?

From the man page of git, sftp doesn't seem supported, and ssh:// complains about git-receive-pack not being installed on the server.

The man page documents a rsync:// protocol, but

$ git push rsync://some.location.com/
fatal: I don't handle protocol 'rsync'
$ 

What am I missing?

Thanks,

#6 lore raw
In reply to Matthieu Moy

Dear diary, on Thu, Nov 02, 2006 at 01:04:16PM CET, I got a letter where Matthieu Moy <[email protected]> said that...

Quoted 9 lines
Quoted 5 lines · Petr Baudis

I think a patch that would add support for pushing over sftp or some
other dumb protocol would be welcome. One problem is with proper locking of ref updates (not sure how well would sftp cope with that), another is that you will need to do git-update-server-info's job on the server side.

It should be possible (but not implemented AAUI) also to generate the additional info of git-update-server-info on the client, isn't it?

Yes, that's what git-http-push does.

Signature · 4 lines
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1