使用Centos 7时在Vagrant up上出现rsync错误
我想在我的新笔记本电脑上移动到一个virtualbox环境,所以我想测试一下vagrant。然而,我没能在一个接一个的错误中从流浪汉身边走过,我已经克服了许多错误,现在我陷入困境 Rsync总是无法执行ssh(下面是完整错误)使用Centos 7时在Vagrant up上出现rsync错误,centos,vagrant,rsync,centos7,Centos,Vagrant,Rsync,Centos7,我想在我的新笔记本电脑上移动到一个virtualbox环境,所以我想测试一下vagrant。然而,我没能在一个接一个的错误中从流浪汉身边走过,我已经克服了许多错误,现在我陷入困境 Rsync总是无法执行ssh(下面是完整错误) 平台Windows 7 pro SP1 Cygwin与Rsync一起安装 流浪汉 已安装Virtualbox Putty.exe在我的桌面上 Git已安装 将rsync和腻子添加到系统路径的末端,如 。。;C:\HashiCorp\Vagrant\bin;C:\Use
- 平台Windows 7 pro SP1李>
- Cygwin与Rsync一起安装李>
- 流浪汉
- 已安装Virtualbox
- Putty.exe在我的桌面上李>
- Git已安装
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]
在阻塞点上,ssh未安装或未配置为运行(经ops确认),因此它会抛出错误(也有评论)
作为补充说明,安装可以很好地消除警告
vagrant plugin install vagrant vbguest
将负责安装vbguest,共享文件夹将更好地与来宾添加一起工作。您可以首先使用插件vagrant plugin install vagrant vbguest
并重新启动计算机以清除来宾添加消息。您还可以确保您的系统上安装了ssh吗?您是对的,尽管ssh是通过cygwin安装的,但它没有配置为运行。我现在已经这样做了,很好:-)很好,回答了这个问题就可以标记为Resolved了。我在Ubuntu主机上使用了相同的解决方案。由于这与win7无关,因此可以从标题中删除此“标记”。
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]