Skip to content
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
Closed

windows rsync #4586

LukeChannings opened this issue Oct 3, 2014 · 6 comments
Labels

Comments

@LukeChannings
Copy link

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
Copy link

+1, same problem

@avevlad
Copy link

avevlad commented Oct 5, 2014

+1

@mitchellh
Copy link
Contributor

This looks like a dup of #4073

@kaliatech
Copy link

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
Copy link

fegu commented Sep 8, 2015

kaliatech, you solved this for me.

@bnicolas11
Copy link

@kaliatech, you save me, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants