Vagrant rsync错误:错误:无法创建目录'/home/Eric/.ssh'

时间:2016-01-18 15:47:35

标签: cygwin vagrant rsync cwrsync

我在Windows 10上安装了Vagrant 1.8.1以及cygwin和cwRsync。现在,当流浪的时候我得到这个错误:

There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /cygdrive/m/development/Projects/www.webapp.local/
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 ControlMaster=auto -o ControlPath=C:/Users/Eric/AppData/Local/Temp/ssh.202 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'M:/development/Projects/www.webapp.local/.vagrant/machines/default/virtualbox/private_key' --exclude .vagrant/ /cygdrive/m/development/Projects/www.webapp.local/ vagrant@127.0.0.1:/vagrant
Error: Could not create directory '/home/Eric/.ssh'.
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
mm_receive_fd: no message header
process_mux_new_session: failed to receive fd 0 from slave
mux_client_request_session: read from master failed: Connection reset by peer
Failed to connect to new control master
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]

我已经尝试过这篇文章中的建议:http://ekawas.blogspot.co.uk/2007/03/solving-pesky-ssh-issues-in-cygwin.html

但没有成功。

2 个答案:

答案 0 :(得分:0)

现在我尝试使用另一个Debian 8盒子,我很惊讶这个盒子可以一次性工作,而不需要安装rsync和cygwin分开,就像Vagrant在我看来如何工作一样:安装和设置麻烦。同步/ vagrant文​​件夹也适用于两个方向。

我真的不明白为什么有些盒子需要安装rsync和cygwin以及在Vagrant文​​件和其他盒子中进行黑客攻击时只需使用Vagrant的基本设置。

嗯,我不是流浪专家,所以也许我会错过这种方式?也许有人可以解释一下?

答案 1 :(得分:0)

这似乎是known issue,Vagrant> = 1.8.0和Windows主机。

对于那些仍在努力的人,请删除$ VAGRANT_HOME \ embedded \ gems \ gems \ vagrant-1.8.0 \ plugins \ synced_folders \ rsync \ helper.rb中的以下代码(第77到79行):

"-o ControlMaster=auto " +
"-o ControlPath=#{controlpath} " +
"-o ControlPersist=10m " +

Source