vagrant - 无法在代理后面做 Vagrant

标签 vagrant

我无法在 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_PROXYHTTPS_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/

相关文章:

python - 使用 Vagrant 在本地运行 Heroku Cedar

python - 是否可以在从 Jenkins 启动的 vagrant box 中运行测试套件?

mysql - 使用 vagrant 提供简单的 mysql 设置(使用 shell provisioner)

shell - 如何在不实际运行 "vagrant ssh"的情况下 ssh 到 vagrant ?

docker - 无法安装 Docker - 哈希和不匹配(Ubuntu 18.04、Vagrant、Virtualbox)

vagrant - "Job for system-cloudinit@-var-tmp-hostname.yml.service failed because a configured resource limit was exceeded"

vagrant - 设置 GetHostTimeDisabled = 1 后出现错误 vagrant up

linux - 无法从与 jenkins 服务相同的文件中提供 scala/sbt

laravel - Vagrant laravel box, guest 机进入无效状态

networking - Vagrant:如何在 Vagrantfile 中配置多个网卡?