Rsync“;“拒绝许可”;使用Vagrant'时出错;Windows上的docker提供程序

Rsync“;“拒绝许可”;使用Vagrant'时出错;Windows上的docker提供程序,docker,vagrant,rsync,boot2docker,Docker,Vagrant,Rsync,Boot2docker,刚刚从官方网站安装了vagrant 1.7.4,还有其他软件:Virtual Box、cygwin(rsync和openssh)。其他的盒子如ubuntu/trusty或centos/7似乎也能工作。当我尝试使用docker作为提供程序时出现错误。 这是我的流浪汉档案 Vagrant.configure(2) do |config| config.vm.network "public_network", ip: "192.168.1.103" config.ssh.in

刚刚从官方网站安装了vagrant 1.7.4,还有其他软件:Virtual Box、cygwin(rsync和openssh)。其他的盒子如ubuntu/trusty或centos/7似乎也能工作。当我尝试使用docker作为提供程序时出现错误。 这是我的流浪汉档案

Vagrant.configure(2) do |config|        
  config.vm.network "public_network", ip: "192.168.1.103" 
  config.ssh.insert_key=true
  config.vm.provider "docker" do |d|
    #d.vagrant_vagrantfile = "vagrantfile-boot2docker"  
    d.build_dir = "."
  end
  ENV["VAGRANT_DETECTED_OS"] = ENV["VAGRANT_DETECTED_OS"].to_s + " cygwin"
end
下面是控制台中发生的事情

我理解权限的问题,但我不确定boot2docker或host的权限是什么。 我也尝试过不使用config.ssh.insert_key=true-结果相同

更新:
试图从日志手动执行大rsync命令。显示错误

连接到主机127.0.0.1端口22:连接被拒绝

但是使用ssh进行直接连接docker@127.0.0.1-P2201成功

所以问题可能是rsync命令使用了不正确的端口

更新2

最后,
rsync-e'ssh-p2201'-rsync path='sudo rsync'-avz/cygdrive/f/st***/Pre****/docker@127.0.0.1:/var/lib/docker/docker_1447763422_11407
按原样同步了所有内容,没有任何问题。但问题仍然存在,为什么vagrant没有正确地运行它。

请注意当您试图手动运行rsync及其使用的端口时出现的错误消息。为了正确地测试它,您需要通过将
ssh-p
调用包装到
-e
标志中来指定端口号,如:
rsync-e'ssh-p 2222'…
它向我询问了'docker'用户的密码,我使用了'tcuser'并获得了'skipping directory.'行作为结果输出。我还指定了-avz标志。由于权限被拒绝错误,仅同步了其他一些文件失败。但不知怎的,它起了作用。当运行
vagrant up
时,它是否提示输入密码?它提到它可能会这样做,但很难从输出中看出它是否会这样做。看起来它无法验证Though不幸的是,它没有。
$ vagrant up
Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
    default: Docker host VM is already ready.
==> default: Syncing folders to the host VM...
    default: The machine you're rsyncing folders to is configured to use
    default: password-based authentication. Vagrant can't script rsync to automatically
    default: enter this password, so you'll likely be prompted for a password
    default: shortly.
    default:
    default: If you don't want to have to do this, please enable automatic
    default: key insertion using `config.ssh.insert_key`.
    default: Rsyncing folder: /cygdrive/f/st***/Pre*****/ => /var/lib/docker/docker_1447743654_45276
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /cygdrive/f/st***/Pre*****/
Guest path: /var/lib/docker/docker_1447743654_45276
Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2201 -o StrictHostKeyChecking=no -o
IdentitiesOnly=true -o UserKnownHostsFile=/dev/null --exclude 
.vagrant/ /cygdrive/f/st***/Pre*****/
docker@127.0.0.1:/var/lib/docker/docker_1447743654_45276
Error: Warning: Permanently added '[127.0.0.1]:2201' (ECDSA) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).
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]