使用迷航1.8.1,当尝试对已经被插入的框执行“流浪者向上--提供者virtualbox”时,我会得到一个“错误:无法创建目录”/home/username/..ssh‘“。
这里的每个方向- https://atlas.hashicorp.com/centos/boxes/7the如下:
命令:
vagrant init centos/7; vagrant up --provider virtualbox输出:
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.
Host path: /cygdrive/c/VMs/vagrant/centos7-util/
Guest path: /home/vagrant/sync
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:/DEV/cygwin64/tmp/ssh.540 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/VMs/vagrant/centos7-util/.vagrant/machines/default/virtualbox/private_key' --exclude .vagrant/ /cygdrive/c/VMs/vagrant/centos7-util/ vagrant@127.0.0.1:/home/vagrant/sync
Error: Could not create directory '/home/username/.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]我最初没有/home/username/..ssh目录,所以我尝试使用手动创建的目录,然后使用指向我现有的c:/user/username/..ssh目录的符号链接,但是始终会得到相同的错误。
更新:我尝试恢复到迷航1.7.4,并得到相同的错误。此外,当试图通过git bash、cygwin或windows cmd提示符执行游走操作时,就会发生这种情况。
发布于 2016-01-13 16:25:23
就我的情况而言,这个错误似乎只发生在这个特定的框中。通过过多的额外故障排除,我最终发现使用大多数其他框都很好,例如https://github.com/CommanderK5/packer-centos-template/releases/download/0.7.1/vagrant-centos-7.1.box。
我希望这能帮别人节省点时间。
发布于 2016-07-02 03:25:36
在Windows下,RSync将尝试更新%HOME%/..ssh/已知_hosts文件。如果%HOME%未定义为您的环境变量之一,它可能会尝试添加/更新没有权限的文件,但会失败。解决方案:将用户环境变量设置为%USERPROFILE%。
来源:https://github.com/mitchellh/vagrant-aws/wiki/Common-Pitfalls
https://stackoverflow.com/questions/34754717
复制相似问题