# git over rsync+ssh

8 messages from 2008-07-09 to 2008-07-10. Participants: Michael J Gruber, Mike Ralphson, Avery Pennarun, Teemu Likonen, Stephen Sinclair.
Thread: https://gitlist.dev/t/14371

## Michael J Gruber, 2008-07-09 14:01

Subject: git over rsync+ssh
Message-ID: <g52gbg$si9$1@ger.gmane.org>
URL: https://gitlist.dev/e/g52gbg%24si9%241%40ger.gmane.org

```
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

```

## Mike Ralphson, 2008-07-09 15:02

Subject: Re: git over rsync+ssh
Message-ID: <e2b179460807090802j2dbb72efo4f03c0a9e79241c0@mail.gmail.com>
URL: https://gitlist.dev/e/e2b179460807090802j2dbb72efo4f03c0a9e79241c0%40mail.gmail.com
In-Reply-To: <g52gbg$si9$1@ger.gmane.org>

```
2008/7/9 Michael J Gruber <michaeljgruber+gmane@fastmail.fm>:
> 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.

> 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

```

## Avery Pennarun, 2008-07-09 16:02

Subject: Re: git over rsync+ssh
Message-ID: <32541b130807090902q2cdc9fcbg6f685dcb96407644@mail.gmail.com>
URL: https://gitlist.dev/e/32541b130807090902q2cdc9fcbg6f685dcb96407644%40mail.gmail.com
In-Reply-To: <g52gbg$si9$1@ger.gmane.org>

```
On 7/9/08, Michael J Gruber <michaeljgruber+gmane@fastmail.fm> wrote:
> 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

```

## Teemu Likonen, 2008-07-09 17:17

Subject: Re: git over rsync+ssh
Message-ID: <20080709171721.GA3679@mithlond.arda.local>
URL: https://gitlist.dev/e/20080709171721.GA3679%40mithlond.arda.local
In-Reply-To: <32541b130807090902q2cdc9fcbg6f685dcb96407644@mail.gmail.com>

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

> 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).

```

## Stephen Sinclair, 2008-07-09 20:33

Subject: Re: git over rsync+ssh
Message-ID: <9b3e2dc20807091333l38260b88na89939bdde09508e@mail.gmail.com>
URL: https://gitlist.dev/e/9b3e2dc20807091333l38260b88na89939bdde09508e%40mail.gmail.com
In-Reply-To: <g52gbg$si9$1@ger.gmane.org>

```
On Wed, Jul 9, 2008 at 10:01 AM, Michael J Gruber
<michaeljgruber+gmane@fastmail.fm> wrote:
> 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

```

## Michael J Gruber, 2008-07-10 10:06

Subject: Re: git over rsync+ssh
Message-ID: <g54mvv$kek$1@ger.gmane.org>
URL: https://gitlist.dev/e/g54mvv%24kek%241%40ger.gmane.org
In-Reply-To: <e2b179460807090802j2dbb72efo4f03c0a9e79241c0@mail.gmail.com>

```
Mike Ralphson venit, vidit, dixit 09.07.2008 17:02:
> 2008/7/9 Michael J Gruber <michaeljgruber+gmane@fastmail.fm>:
>> 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

```

## Michael J Gruber, 2008-07-10 10:09

Subject: Re: git over rsync+ssh
Message-ID: <g54n4a$kek$2@ger.gmane.org>
URL: https://gitlist.dev/e/g54n4a%24kek%242%40ger.gmane.org
In-Reply-To: <20080709171721.GA3679@mithlond.arda.local>

```
Teemu Likonen venit, vidit, dixit 09.07.2008 19:17:
> Avery Pennarun wrote (2008-07-09 12:02 -0400):
> 
>> 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).

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

```

## Michael J Gruber, 2008-07-10 10:14

Subject: Re: git over rsync+ssh
Message-ID: <g54nek$mbe$1@ger.gmane.org>
URL: https://gitlist.dev/e/g54nek%24mbe%241%40ger.gmane.org
In-Reply-To: <9b3e2dc20807091333l38260b88na89939bdde09508e@mail.gmail.com>

```
Stephen Sinclair venit, vidit, dixit 09.07.2008 22:33:
> On Wed, Jul 9, 2008 at 10:01 AM, Michael J Gruber
> <michaeljgruber+gmane@fastmail.fm> wrote:
>> 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.

> 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.

```
