当前位置:  开发笔记 > 编程语言 > 正文

使用Centos 7进行Vagrant时出现rsync错误

如何解决《使用Centos7进行Vagrant时出现rsync错误》经验,为你挑选了1个好方法。

我想转移到我的新笔记本电脑上的虚拟机环境,所以想测试流浪汉.然而,我没有能够在没有一个接一个错误的情况下超越Vagrant,我遇到了一些错误,现在我陷入困境.

Rsync总是无法执行ssh(下面的完整错误)

平台Windows 7专业版SP1.

Cygwin安装了Rsync.

Vagrant已安装

已安装Virtualbox

Putty.exe在我的桌面上.

Git已安装.

rsync和putty添加到sytstem路径的末尾

..; C:\ HashiCorp\Vagrant\bin; C:\ Users\paul\Desktop\putty.exe; C:\ cygwin64\bin; C:\ Program Files\Git\cmd

Vagrant文​​件包含(包括windows/rsync错误修复)

Vagrant.configure(2) do |config|
  config.vm.box = "centos/7"
  ENV["VAGRANT_DETECTED_OS"] = ENV["VAGRANT_DETECTED_OS"].to_s + " cygwin"
 end

我还尝试将C:\ HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.6.X\plugins\synced_folders\rsync\helper.rb中的第43行更改为hostpath ="/ cygdrive"+ Vagrant :: Util :: Platform .cygwin_path(hostpath)

而不是把它放在流浪文件中.

我仍然无法让rsync工作.我甚至不确定为什么它需要在'up'上执行此操作.

我从cmd运行vagrant这里是完整的输出.

 C:\Users\paul\Projects\gettingStarted-centos7>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest

    default: additions are required for forwarded ports, shared folders, host on
ly
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work prope
rly,
    default: in which case you may ignore this message.
==> default: Rsyncing folder: /cygdrive/c/Users/paul/Projects/gettingStarted-cen
tos7/ => /home/vagrant/sync
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /cygdrive/c/Users/paul/Projects/gettingStarted-centos7/
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 StrictHos
tKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/Us
ers/paul/Projects/gettingStarted-centos7/.vagrant/machines/default/virtualbox/pr
ivate_key' --exclude .vagrant/ /cygdrive/c/Users/paul/Projects/gettingStarted-ce
ntos7/ vagrant@127.0.0.1:/home/vagrant/sync
Error: rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.1]
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.1]

Frédéric Hen.. 7

在阻塞点上,ssh未安装或未配置为运行(由ops确认),因此它会抛出错误(也在github问题上发表评论)

作为旁注,最好安装vagrant vbguest插件,这样你就可以摆脱警告.vagrant plugin install vagrant-vbguest将负责安装vbguest,共享文件夹将更好地与客人添加.



1> Frédéric Hen..:

在阻塞点上,ssh未安装或未配置为运行(由ops确认),因此它会抛出错误(也在github问题上发表评论)

作为旁注,最好安装vagrant vbguest插件,这样你就可以摆脱警告.vagrant plugin install vagrant-vbguest将负责安装vbguest,共享文件夹将更好地与客人添加.

推荐阅读
360691894_8a5c48
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有