Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cygwin rsync protocol error

Tags:

rsync

I'm trying to rsync files between 64bit windows 7 and 64bit Linux. I have rsync 3.0.7 installed on both machine (cygwin version on windows).

This is the command I'm running on windows. I see it's establishing a connection to the remote machine but it just dies after authenticating and before transferring files. What could cause this problem?

rsync -vvvv localfile REMOTE-HOST:~/

FILE_STRUCT_LEN=16, EXTRA_LEN=4
cmd=<NULL> machine=REMOTE-HOST user=guest path=~/
cmd[0]=ssh cmd[1]=-l cmd[2]=guest cmd[3]=REMOTE-HOST cmd[4]=rsync cmd[5]=--server cmd[6]=-vvvvv.Lsf cmd[7]=. cmd[8]=~/
opening connection using: ssh -l guest REMOTE-HOST rsync --server -vvvve.Lsf. "~/"
note: iconv_open("UTF-8", "UTF-8") succeeded.
Password:
FILE_STRUCT_LEN=24, EXTRA_LEN=4
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
[Receiver] _exit_cleanup(code=12, file=io.c, line=601): entered
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [Receive
r=3.0.7]
[Receiver] _exit_cleanup(code=12, file=io.c, line=601): about to call exit(12)
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
[sender] _exit_cleanup(code=12, file=/home/lapo/packaging/rsync-3.0.7-1/src/rsyn
c-3.0.7/io.c, line=601): entered
rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packagi
ng/rsync-3.0.7-1/src/rsync-3.0.7/io.c(601) [sender=3.0.7]
[sender] _exit_cleanup(code=12, file=/home/lapo/packaging/rsync-3.0.7-1/src/rsyn
c-3.0.7/io.c, line=601): about to call exit(12)
like image 465
kefeizhou Avatar asked Feb 03 '11 21:02

kefeizhou


1 Answers

The problem was a conflicting git installation. Git included it's own ssh and it's path was before cygwin path, so rsync was using git's ssh. The fix was to swap the order of git/cygwin bin path so rsync was using the right version of ssh.

like image 189
kefeizhou Avatar answered Sep 28 '22 22:09

kefeizhou