Skip to contentSkip to conversation

git over rsync+ssh

DISCUSSION Michael J Gruber 5 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I want to put a git repo on a server where I have ssh access but failed to compile git (AIX 5.1, has libz.a but no .so nor headers; compiling prerequisite zlib failed, probably due to a botched build environment).

As far as I can see my only option for a private repo is using rsync over ssh.

Alas, the rsync:// transport of git seems to imply an rsync daemon connection.

How can I specify rsync over ssh as the git transport?

Alternatively, can I maybe compile the bits that git over ssh needs on the server side without zlib?

Michael

#1 lore raw
Quoted 11 lines · Michael J Gruber

I want to put a git repo on a server where I have ssh access but failed to compile git (AIX 5.1, has libz.a but no .so nor headers; compiling prerequisite zlib failed, probably due to a botched build environment).

As far as I can see my only option for a private repo is using rsync over
ssh.

Alas, the rsync:// transport of git seems to imply an rsync daemon
connection.

How can I specify rsync over ssh as the git transport?

I don't know if this will help in your case, but if it will be only you pushing to this repository, one option is to simply create a bare push repository on your local machine, and then manually just rsync+ssh it to the remote machine from the command line as a so-called "push" operation.

You would then make the repo available to others over http or something, which presumably you have available.

Would that work?

Have fun,

Avery

#2 lore raw

Avery Pennarun wrote (2008-07-09 12:02 -0400):

Quoted 5 lines

I don't know if this will help in your case, but if it will be only you pushing to this repository, one option is to simply create a bare push repository on your local machine, and then manually just rsync+ssh it to the remote machine from the command line as a so-called "push" operation.

Again, I don't know if this is helpful for Michael, but this "manual" rsyncing can be done automatically via hooks/post-receive. Just like Avery said, "git push" to a bare repository in a local machine and this bare repo has post-receive hook which does "git update-server-info" and the rsyncing (or "sitecopy --update" or similar).

#3 lore raw

Teemu Likonen venit, vidit, dixit 09.07.2008 19:17:

Quoted 8 lines

Avery Pennarun wrote (2008-07-09 12:02 -0400):

Quoted 5 lines

I don't know if this will help in your case, but if it will be only you pushing to this repository, one option is to simply create a bare push repository on your local machine, and then manually just rsync+ssh it to the remote machine from the command line as a so-called "push" operation.

Quoted 5 lines

Again, I don't know if this is helpful for Michael, but this "manual" rsyncing can be done automatically via hooks/post-receive. Just like Avery said, "git push" to a bare repository in a local machine and this bare repo has post-receive hook which does "git update-server-info" and the rsyncing (or "sitecopy --update" or similar).

Thanks for your hints. Your posts combined made me understand the trick, using the "auxiliary" local repo for the hooks triggering the rsync. I'll hopefully remember it when I need it; in this case, a second repo would not have been very convenient, but I managed to get git running on the server side meanwhile.

Michael

#4 lore raw
In reply to Michael J Gruber
Quoted 6 lines · Michael J Gruber

I want to put a git repo on a server where I have ssh access but failed to compile git (AIX 5.1, has libz.a but no .so nor headers; compiling prerequisite zlib failed, probably due to a botched build environment).

As far as I can see my only option for a private repo is using rsync over ssh.

Have you tried sshfs?
It allows you to mount an ssh-accessible file system onto your local file system.
This might make it possible to use your local git to access the remote account. Not sure of the implications for data integrity...

Steve

#5 lore raw

Stephen Sinclair venit, vidit, dixit 09.07.2008 22:33:

Quoted 10 lines
Quoted 6 lines · Michael J Gruber

I want to put a git repo on a server where I have ssh access but failed to compile git (AIX 5.1, has libz.a but no .so nor headers; compiling prerequisite zlib failed, probably due to a botched build environment).

As far as I can see my only option for a private repo is using rsync over ssh.

Have you tried sshfs?

Yes, in other cases, with mixed success. In the present situation, I'm just John Doh User on both the client and the server, no sshfs available.

Quoted 4 lines

It allows you to mount an ssh-accessible file system onto your local file system.
This might make it possible to use your local git to access the remote account. Not sure of the implications for data integrity...

Integrity would be okay (single developper). But git is fast with a fast filesystem, not so fast on NFS; on sshfs? I'm not even sure sshfs is "filesystem-like" enough for git. Have you tried it with git?

Michael

P.S.: Problem solved differently now: got git going(TM) on the server.

#6 lore raw
In reply to Michael J Gruber

2008/7/9 Michael J Gruber <[email protected]>:

Quoted 3 lines

I want to put a git repo on a server where I have ssh access but failed to compile git (AIX 5.1, has libz.a but no .so nor headers; compiling prerequisite zlib failed, probably due to a botched build environment).

I can send you a binary to try if you'd like. It would be compiled on AIX 5.3 but I have to jump through hoops on several non-identically set-up servers here, so one might work for you.

# ldd /usr/local/bin/git
/usr/local/bin/git needs:
         /usr/lib/libc.a(shr.o)
         /usr/lib/libz.a(libz.so.1)
         /usr/lib/libiconv.a(shr4.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)
# ar -t /usr/lib/libz.a
libz.so.1
shr.o

Alternatively I can send you what gets installed from zlib-devel.rpm
[1] which you might be able to install in your account's home directory, and then ./configure --with-zlib=PATH ; gmake might work for you.

Quoted 7 lines

As far as I can see my only option for a private repo is using rsync over ssh.

... [snipped the bits I know not]

Alternatively, can I maybe compile the bits that git over ssh needs on the server side without zlib?

I don't think any git is going to get very far without zlib, as it won't understand (be able to verify) the object/pack format at all. I might be wrong about that though.

Mike

[1] ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/zlib/zlib-1.2.3-4.aix5.2.ppc.rpm

#7 lore raw

Mike Ralphson venit, vidit, dixit 09.07.2008 17:02:

Quoted 8 lines

2008/7/9 Michael J Gruber <[email protected]>:

Quoted 3 lines

I want to put a git repo on a server where I have ssh access but failed to compile git (AIX 5.1, has libz.a but no .so nor headers; compiling prerequisite zlib failed, probably due to a botched build environment).

I can send you a binary to try if you'd like. It would be compiled on AIX 5.3 but I have to jump through hoops on several non-identically set-up servers here, so one might work for you.

Thanks for the offer. I found an AIX 4.3 box with a working build environment there, including zlib-devel, and I got git 1.5.6.2 compiled now (no tcltk, don't care). Runs fine on the AIX 5.1 box, I can clone and push happily. Yeah.

Michael