不能“流浪”阿特拉斯框

But*_*kus 4 virtualbox vagrant

Windows 8.1,最新的 vagrant 和 VirtualBox 版本。在 Windows 上的 git CLI 中运行命令。

我能够ubuntu/trusty64毫无问题地启动,并且不需要登录 atlas.hashicorp.com。

但是当我尝试时,ubuntu/xenial64我得到了一个错误。

vagrant init ubuntu/xenial64; vagrant up --provider virtualbox

此外,vagrant logintrusty 64 没有引起任何关于登录的警告,但由于 xenial 64 确实引起了这样的警告,我立即在 atlas.hashicorp.com 上创建了一个帐户。

我曾经vagrant login登录,收到消息“您现在已登录”。

我从文件夹中删除了无业游民的东西并重新执行initup命令,但我再次遇到相同的错误。

$ vagrant init ubuntu/xenial64; vagrant up --provider virtualbox
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'ubuntu/xenial64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/ubuntu/xenial64"]
Error:
Run Code Online (Sandbox Code Playgroud)

但是“错误:”部分是空白的。

我在其他地方找到了一个建议,将框的 url 添加到Vagrantfile这样的:

config.vm.box_url = "http://example.com/some_box_url.box"
Run Code Online (Sandbox Code Playgroud)

/sf/answers/2207709941/

现在使用评论中建议的链接进行测试。这是Vagrantfile不包括大多数评论的完整内容:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "ubuntu/xenial64"
  config.vm.box_url = "https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160610.0.0/providers/virtualbox.box"


  # VirtualBox:
  #
  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = true

    # Customize the amount of memory on the VM:
  #   vb.memory = "1024"
  end

end
Run Code Online (Sandbox Code Playgroud)

但即使使用 url,我也会收到错误消息:

$ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'ubuntu/xenial64' (v0) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160610.0.0/providers/virtualbox.box
    default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Run Code Online (Sandbox Code Playgroud)

没有显示错误信息。

Dan*_* W. 6

我在 OSX 上遇到了同样的问题,不得不删除嵌入的 curl:

sudo rm /opt/vagrant/embedded/bin/curl
Run Code Online (Sandbox Code Playgroud)

然后它将使用系统默认 curl 而不是嵌入式 buggy 的。