无法下载框 - '下载远程文件时出错。'

时间:2015-07-11 08:59:11

标签: curl vagrant

我正在尝试下载一个框,并遇到以下错误:

snowch:~/Demo$ vagrant box add zyga/ubuntu-precise-desktop-i386
==> box: Loading metadata for box 'zyga/ubuntu-precise-desktop-i386'
    box: URL: https://atlas.hashicorp.com/zyga/ubuntu-precise-desktop-i386
==> box: Adding box 'zyga/ubuntu-precise-desktop-i386' (v1.0) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/zyga/boxes/ubuntu-precise-desktop-i386/versions/1.0/providers/virtualbox.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

transfer closed with 1403398904 bytes remaining to read

如果我尝试使用curl下载,我会得到:

snowch:~/Demo$ curl --insecure -L -v https://vagrantcloud.com/zyga/boxes/ubuntu-precise-desktop-i386/versions/1.0/providers/virtualbox.box
...
* SSLv3, TLS alert, Client hello (1):
* transfer closed with 1403398904 bytes remaining to read
* Closing connection 1
* SSLv3, TLS alert, Client hello (1):
curl: (18) transfer closed with 1403398904 bytes remaining to read

我的流浪汉版本是:

snowch:~/Demo$ vagrant --version
Vagrant 1.7.3

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

您可以查看Vagrant正在做什么:

export VAGRANT_LOG=debug

我认为这可能是地图册中的一个错误。我会ping hashicorp。

用于下载框的完整命令如下所示:

curl -q \
--fail \
--location \
--max-redirs 10 \
--user-agent Vagrant/1.7.2 \
--continue-at - \
--output test.box \
https://atlas.hashicorp.com/zyga/boxes/ubuntu-precise-desktop-i386/versions/1.0/providers/virtualbox.box