我无法在 Windows 7 机器上在我们的公司代理后面执行 vagrant up(或 vagrant add)。我尝试过使用和不使用 http_proxy/https_proxy 环境变量。我尝试将 vagrant 插件 vagrant-proxyconf 与各种 http 代理设置一起使用,但没有帮助,问题不在于 guest 的代理,而在于主机的代理。有没有办法让 vagrant 自己使用代理?
vagrant up 的输出:
C:\scratch\vagrant>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/pricise32' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/pricise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on 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/pricise32"]
Error: The requested URL returned error: 404 Not Found
插件:
C:\scratch>vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-proxyconf (1.2.0)
vagrant-share (1.0.1, system)
Vagrant 版:
C:\scratch\vagrant>vagrant -v
Vagrant 1.5.4
最佳答案
正如@Emyl 所指出的,您在框名称中有一个错字(应该是“hashicorp/precise32”)。
作为对问题的回答,Vagrant 支持标准 HTTP_PROXY
和 HTTPS_PROXY
主机上的环境变量。在 Windows 上,您可以使用以下命令在命令行上设置它们:
set HTTP_PROXY="http://proxy:1234"
set HTTPS_PROXY="http://proxy:1234"
也是planned在 future vagrant-proxyconf 也可以在某些情况下自动设置它们。
关于vagrant - 无法在代理后面做 Vagrant ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23365906/