We have a windows file storage (don't ask) and now I want to rsync with the machine from Windows, Mac and Linux.

So I installed freeSSHd (login shell is set to C:/cygwin64/bin/sh.exe), set up certificates and testing from Linux the test.dat has 0 bytes:

ssh myuser@winmachinename "C:/cygwin64/bin/true.exe" > test.dat

Even double checking with actual output works fine:

ssh myuser@winmachinename "C:/cygwin64/bin/ls.exe" > test.dat

Now, when I call rsync:

rsync --progress -avz -e ssh myuser@winmachinename:/c/Users ~/test

it fails with:

protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(174) [Receiver=3.1.0]

As far as reading the docs, this should not happen, when the first test is successful!?

I am by now out of ideas - any recommendations how to debug this?


| OS            | rsync version                             |
| Windows       | rsync  version 3.0.9  protocol version 30 |
| Linux         | rsync  version 3.1.0  protocol version 31 |
  • How about ssh myuser@winmachinename rsync --help -- do you get the rsync usage output?
    – Flup
    Jun 4 '14 at 8:42
  • Yep, works like a charm
    – abergmeier
    Jun 4 '14 at 8:45
  • What versions of rsync do you have on each side? (first line of rsync --version)
    – Flup
    Jun 4 '14 at 8:48
  • See versions in edit
    – abergmeier
    Jun 4 '14 at 9:04
  • Try adding the option --protocol=30 to your rsync command.
    – Flup
    Jun 4 '14 at 9:05

The problem seems to have been the path.

Since I have mysysgit in PATH (but not cygwin), sh.exe called executables from mysysgit and failed. When adding cygwin to PATH before mysysgit, the error disappears.

After that, I have a new issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.