1
在Windows 10使用流浪1.9.2如何在Windows中將文件夾與Vagrant同步?
已安裝的rsync通過chololatey
:
C:\> choco install rsync
的Vagrantfile
:
Vagrant.configure("2") do |config|
...
config.vm.synced_folder "data", "/vagrant"
...
end
這裏要與當前路徑下同步data
文件夾/vagrant
路徑在流浪漢。當登錄到Vagrant並在/vagrant
路徑下創建test
文件時,從Windows data
文件夾中檢查,不存在任何內容。所以文件沒有同步。爲什麼?如何同步?
編輯
今天開始顛沛流離,得到了新的問題:
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /c/Users/me/data/
Guest path: /vagrant
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 LogLevel=FATAL -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i 'C:/Users/me/.vagrant/machines/default/virtualbox/private_key'" "--exclude" ".vagrant/" "/c/Users/me/data/" "[email protected]:/vagrant"
Error: rsync: change_dir "/c/Users/me/data" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]