From my testing, if you are using cygwin, use @ osroot25 solution.
If you use cwRsync and don't have cygwin, there is no workaround for using Vagrant other than editing source code like @Andrew Myers. Tested using Vagrant v1.6.5.
My workaround that works for me is to completely bypass the Tramp and use cwRsync directly. This works for me because I am syncing a folder that almost never changes. I can change it several times in one day (so I have to remember step 2 below each time), but then I study for weeks (or months) without any changes. Remember that to use cwRsync you need to edit and use the cwrsync.cmd script. Attempting to access the rsync.exe command directly or by adding it to your path will fail . Step 1: I added the following line to the end of cwrsync.cmd (in the installed folder):
rsync -re "ssh -p 2222" /cygdrive/b/VCS/packages/ vagrant@localhost :packages --exclude ".git/"
Step 2: I have a separate cmd window that I run cwrsync.cmd using the full path. Then, if I need to synchronize the changes in the virtual machine, I activate this window, the up arrow, return and update instantly!
Changing the ENV for installing cygwin fix by @ osroot25 does not work with cwRsync, because when you force cygwin to be detected, the "tramp ssh" command will not work, because it requires the cygpath command in cygwin, which you will not have, so you cannot ssh to the virtual machine. Itβs good if you use the ssh command directly with all the correct parameters.
source share