Vagrant: windows rsync

Created on 3 Oct 2014  路  6Comments  路  Source: hashicorp/vagrant

Hi,

I'm trying to get rsync to work on a Windows 7 (64-bit) host with an Ubuntu 14.04 guest.
I'm have Git BASH installed, and cwRsync 5.3.0 is in the PATH. My Vagrantfile is here.

I vagrant up, and rsync fails with:

Host path: /e/Development/Projects/projt-one/
Guest path: /app
Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no
-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o StrictHos
tKeyChecking=no -o UserKnownHostsFile=/dev/null -i 'E:/Users/lchannings/.vagrant
.d/insecure_private_key' --exclude .vagrant/ --exclude .git --exclude node_modul
es --exclude js-prod --exclude css --exclude html /e/Development/Projects/projt-
one/ [email protected]:/app
Error: Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known
hosts.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receive
r=3.1.0]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=
3.1.1pre1]

Running ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i 'E:/Users/lchannings/.vagrant.d/insecure_private_key' [email protected] results in a working session.

I've looked at other Windows issues around here and they all appear to be to do with path differences in cygwin vs native windows. I'm running these commands from the standard cmd.exe, but the GNU binutils are in PATH, so I have ls, pwd, etc.

I really don't want to have to install cygwin to get this to work. Any ideas?

Note: I get the same error in Git BASH too, not just cmd.exe.

bug

Most helpful comment

For others that come across this issue, another possibility is that your path includes a version of ssh.exe that is not compatible with your version of rsync.exe. For instance, Git for Windows (mysysgit) includes it's own ssh.exe. If git's ssh.exe is on the path before your cygwin's rsync.exe, then you will see rsync data stream protocol errors exactly like OP. In my case, just switching the path precedence was sufficient.

All 6 comments

+1, same problem

+1

This looks like a dup of #4073

For others that come across this issue, another possibility is that your path includes a version of ssh.exe that is not compatible with your version of rsync.exe. For instance, Git for Windows (mysysgit) includes it's own ssh.exe. If git's ssh.exe is on the path before your cygwin's rsync.exe, then you will see rsync data stream protocol errors exactly like OP. In my case, just switching the path precedence was sufficient.

kaliatech, you solved this for me.

@kaliatech, you save me, thank you!

Was this page helpful?
0 / 5 - 0 ratings