Vagrant up on Windows 7:错误设置证书验证位置
Vagrant up on Windows 7: error setting certificate verify locations
我刚认识 Vagrant
,正在尝试通过入门说明 https://www.vagrantup.com/intro/getting-started/index.html
Before diving into your first project, please install the latest version of Vagrant. And because we will be using VirtualBox as our provider for the getting started guide, please install that as well.
我的主机是Windows 7 x64
。 Virtualbox
是 5.1.14r112924
。启用虚拟化:我成功使用Windows XP虚拟机
所以我安装了最新的 Vagrant
版本 2.0.0
。我将 Powershell
从 2.0
更新为 5.0
以修复 vagrant up
没有任何问题。
因此,入门说明:
vagrant init hashicorp/precise64
: 好的,文件 Vagrantfile
出现了;
vagrant up
,开始说:
After running the above two commands, you will have a fully running virtual machine in VirtualBox running Ubuntu 12.04 LTS 64-bit.
但我看到了:
E:\VM\v_demo>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/precise64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, 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://vagrantcloud.com/hashicorp/precise64"]
Error: error setting certificate verify locations:
CAfile: /mingw64/ssl/certs/ca-bundle.crt
CApath: none
在我的工作文件夹中,文件树如下:
| Vagrantfile
|
\---.vagrant
\---machines
\---default
\---virtualbox
vagrant_cwd
此错误的 Internet 搜索显示有关 curl
和 git
的结果,但此处未使用它们。
有关尝试 vagrant login
错误消息的建议也不清楚。正如 https://www.vagrantup.com/docs/cli/login.html
所说
Command: vagrant login
The login command is used to authenticate with the HashiCorp's Vagrant
Cloud server. Logging is only necessary if you are accessing protected
boxes or using Vagrant Share.
Logging in is not a requirement to use Vagrant. The vast majority of
Vagrant does not require a login. Only certain features such as
protected boxes or Vagrant Share require a login.
我不认为测试示例是私有的。
而且我在任何地方都找不到 Create account
按钮。
我错过了什么?
UPD
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
config.vm.box_download_insecure = true
end
值 config.vm.box_download_insecure = true
没有帮助:相同的结果。
UPD2
我找到了如何创建帐户 https://app.vagrantup.com/account/new(在我使用移动版之前)。
vagrant login
没有帮助:相同的结果
手动解决方案:
- 手动将
.box
文件从 https://hashicorp-files.hashicorp.com/precise64.box 下载到本地文件夹 local_box\precise64.box
;
将路径添加到本地 .box
-file inside Vagrantfile
:
Vagrant.configure("2") do |config|
config.vm.box = "local_box/precise64.box"
end
vagrant up
现在可以正常工作了。
实际问题出在代理服务器上。
设置 Windows
环境变量 https_proxy=http://192.168.x.xxx:3128
解决了问题。
我刚认识 Vagrant
,正在尝试通过入门说明 https://www.vagrantup.com/intro/getting-started/index.html
Before diving into your first project, please install the latest version of Vagrant. And because we will be using VirtualBox as our provider for the getting started guide, please install that as well.
我的主机是Windows 7 x64
。 Virtualbox
是 5.1.14r112924
。启用虚拟化:我成功使用Windows XP虚拟机
所以我安装了最新的 Vagrant
版本 2.0.0
。我将 Powershell
从 2.0
更新为 5.0
以修复 vagrant up
没有任何问题。
因此,入门说明:
vagrant init hashicorp/precise64
: 好的,文件Vagrantfile
出现了;vagrant up
,开始说:
After running the above two commands, you will have a fully running virtual machine in VirtualBox running Ubuntu 12.04 LTS 64-bit.
但我看到了:
E:\VM\v_demo>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/precise64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, 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://vagrantcloud.com/hashicorp/precise64"]
Error: error setting certificate verify locations:
CAfile: /mingw64/ssl/certs/ca-bundle.crt
CApath: none
在我的工作文件夹中,文件树如下:
| Vagrantfile
|
\---.vagrant
\---machines
\---default
\---virtualbox
vagrant_cwd
此错误的 Internet 搜索显示有关 curl
和 git
的结果,但此处未使用它们。
有关尝试 vagrant login
错误消息的建议也不清楚。正如 https://www.vagrantup.com/docs/cli/login.html
Command: vagrant login
The login command is used to authenticate with the HashiCorp's Vagrant Cloud server. Logging is only necessary if you are accessing protected boxes or using Vagrant Share.
Logging in is not a requirement to use Vagrant. The vast majority of Vagrant does not require a login. Only certain features such as protected boxes or Vagrant Share require a login.
我不认为测试示例是私有的。
而且我在任何地方都找不到 Create account
按钮。
我错过了什么?
UPD
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
config.vm.box_download_insecure = true
end
值 config.vm.box_download_insecure = true
没有帮助:相同的结果。
UPD2
我找到了如何创建帐户 https://app.vagrantup.com/account/new(在我使用移动版之前)。
vagrant login
没有帮助:相同的结果
手动解决方案:
- 手动将
.box
文件从 https://hashicorp-files.hashicorp.com/precise64.box 下载到本地文件夹local_box\precise64.box
; 将路径添加到本地
.box
-file insideVagrantfile
:Vagrant.configure("2") do |config| config.vm.box = "local_box/precise64.box" end
vagrant up
现在可以正常工作了。
实际问题出在代理服务器上。
设置 Windows
环境变量 https_proxy=http://192.168.x.xxx:3128
解决了问题。