-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rsync on Windows using cwRsync fails with No such file or directory (2) #3230
Comments
I had these problems yesterday.
|
@kylemacfarlane Thanks! Works like a charm! |
@Balajisi Can we reopen this? This is still an issue on 1.6.3 (and shouldn't have to be fixed by editing the vagrant source). https://github.com/mitchellh/vagrant/blob/master/plugins/synced_folders/rsync/helper.rb#L43 |
+1, this should be re-opened. I had to make this change as well to get rsync working. |
Also having this problem in 1.6.3. I found that platform.rb wasn't detecting cygwin, so switching to see if ENV path contained cygwin fixed it, but this a pretty bad hack. |
+1, re-open please. Also having this problem in 1.6.3. I had to make this change to get rsync working. |
It now needs to be applied on line 43: |
I think someone should probably make a new issue, this won't get any attention since it's already closed. |
@francislavoie I think you're right. One final attempt: @mitchellh Re-open? |
same problem and "/cygdrive" + helped, should be fixed |
Version 1.5.4 worked, but version 1.6.3 broke. It treats c:\Users as /c/Users, which doesn't work on Windows. It should use the colon:
|
That's not the problem. Cygwin uses unix style paths and mounts the |
+1 |
2 similar comments
+1 |
+1 |
As I briefly stated above (but not very clearly I see) the problem is the test in HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/platform.rb for ENV["VAGRANT_DETECTED_OS"] that no longer properly detects cygwin. VAGRANT_DETECTED_OS is coming from |
The problem specifically with cwRsync (which this ticket is about) is that it's a standalone version of rsync for Windows and doesn't require Cygwin to be installed. So with a regular standalone cwRsync installation, Cygwin will never be on the PATH and Vagrant will never add the required /cygdrive prefix. The solution I think is to add a configuration setting that allows users to set their own prefix. Currently Vagrant tries to be smart and detect the environment but it obviously doesn't work reliably. |
+1 |
+1 same issue |
+1 same issue vagrant 1.6.3 |
+1 same here. |
+1 in vagrant 1.6.3 as well (with cwRsync installed and on PATH) Changing line 43 in |
I also had trouble with vagrant not detecting cygwin. After reading @kriserickson 's comment and inspecting the source, manually adding VAGRANT_DETECTED_OS=cygwin to the environment fixed it for me. I'm on Vagrant 1.6.3 with rsync 3.0.9 on both win (via cygwin, non-standalone) and vm. The issue is still valid though, as manually setting this should not be necessary. |
I got the newest Vagrant Version installed (1.6.5) and I have the same problem. I have Cygwin and rsync installed. My output is:
I tried to change live 43 of |
@kummerer94 you seem to be missing SSH which is used by rsync. Install it from network category in Cygwin. |
+1 still getting this issue on 1.6.5. |
@osroot25 's solution works, however if you also use windows cmd for vagrant calls (ex. I run a script in phpstorm that uses windows cmd) then you should add your cygwin bin file to your %PATH% variables. Otherwise you will get errors like:
VagrantFile
|
For some reason it doesn't work for me - editing the Vagrantfile to modify I traced through the code; even though I ended up adding an additional check in Edit: return true if ENV["TERM"] &&
ENV["TERM"].downcase.include?("cygwin") After this, the vagrant commands |
@jamesvl Only the MSYS or Git Bash terminal reports its |
Works for me too! Thanks @Venorcis @brunowego |
We still need a solution that works without cygwin on Windows. i'm putting together some info now. Will post later. |
Hi, just a note: VAGRANT_DETECTED_OS=cygwin vagrant up or if needed, place it in your bash startup file .profile, .bashrc in your cygwin home , whatever. |
I have tried cwRsync, MinGW and cygwin on Windows 7.1 and the only way I got rsync working is with cygwin by using the cygwin shell and setting
in the Vagrant file. |
@BinaryCrafts nice, share your solution with mitchell.... |
@JaminShanti cygwin and the cygwin shell are not a solution that I can use and I suspect that others will have the same restriction. For rsync to be fully supported on Windows, it must be possible in any shell. |
Im just trying to get my first ever vagrant box up! Installed the latest versions of Virtualbox, Vagrant, Putty, and then when i got rsync errors I installed Cygwin with rsync. have tried both the options here, moved the rsync so it comes before git in the global path and still I get the following error when trying to run vagrant up in a cmd. (with ENV["VAGRANT_DETECTED_OS"] = ENV["VAGRANT_DETECTED_OS"].to_s + " cygwin" in the vagrant file) Bringing machine 'default' up with 'virtualbox' provider...
ly Host path: /cygdrive/c/Users/paul/Projects/gettingStarted-centos7/ Any ideas greatly appreciated. |
Fixed my own problem and putting instructions here for anyone else in similar problem. The issue is that SSh is not installed on windows and even though I had installed it via cygwin, it was not set up to run as a service. |
The suggestion with
fixed my problem. Thanks @osroot25! 👍 Scott |
Windows 10 (untested on other versions) has issues with rsync, as the file "/c/some/directory" can't be found. Adding the "/cygwin" + fixes it. See related thread and comments: hashicorp#3230 (comment)
The original problem is still on windows 10. The line edit fixed it:
|
This issue is still in 1.8.1 too. Scott |
+1 Still doesnt work on 10 |
+1 Vagrant 1.8.1 & Win7 |
+1 on win10 w/ embedded git bins into powershell. |
+1 Vagrant 1.8.5 on Windows 10 |
Updating to lates (1.8.5) fixed the issue for me. @strarsis if you got 1.8.5 and its not working, maybe the upgrade didnt finish properly? How does the rsync_helper.rb look for you? Maybe the installation got messed up? meanwhile, try this: #3230 (comment) |
I am using cygwin rsync now instead of cwRsync and it works fine. |
Thank you @starrychloe |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi,
I am trying to set up an Rsync share on a Windows 8 machine with a Ubuntu 12.04 LTS Guest VM, and it fails with the following error.
I am using cwRsync version 3.1.0 downloaded from the following location: https://www.itefix.no/download/cwRsync_5.2.2_Free.zip
I am running this in a Git Bash window with Administrative Privileges. My user is also the owner of the directory being shared, so I doubt whether it could be an issue where I don't have enough privileges.
The Rsync version in the Guest is 3.0.9. At first, I thought that was the issue. But even if I manually install 3.1.0 from source, I am getting the same error.
Any advice? Thanks in advance.
The text was updated successfully, but these errors were encountered: