New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows rsync #4586

Closed
LukeChannings opened this Issue Oct 3, 2014 · 6 comments

Comments

Projects
None yet
7 participants
@LukeChannings

LukeChannings commented Oct 3, 2014

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/ vagrant@127.0.0.1:/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' vagrant@127.0.0.1 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.

@collinsmao

This comment has been minimized.

collinsmao commented Oct 5, 2014

+1, same problem

@AveVlad

This comment has been minimized.

AveVlad commented Oct 5, 2014

+1

@mitchellh

This comment has been minimized.

Member

mitchellh commented Oct 24, 2014

This looks like a dup of #4073

@mitchellh mitchellh closed this Oct 24, 2014

@kaliatech

This comment has been minimized.

kaliatech commented Apr 22, 2015

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.

@fegu

This comment has been minimized.

fegu commented Sep 8, 2015

kaliatech, you solved this for me.

@bnicolas11

This comment has been minimized.

bnicolas11 commented Oct 16, 2015

@kaliatech, you save me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment