无法在代理后面做流浪汉

Dav*_*emy 5 vagrant

我无法在Windows 7计算机上的公司代理后面进行流浪汉(或流浪汉添加).我尝试过使用和不使用http_proxy/https_proxy环境变量.我尝试使用vagrant插件vagrant-proxyconf和各种http代理设置,但它没有帮助,问题不在于客户的代理与主机的.有没有办法让流浪者自己使用代理?

流浪者的输出:

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
Run Code Online (Sandbox Code Playgroud)

插件:

C:\scratch>vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-proxyconf (1.2.0)
vagrant-share (1.0.1, system)
Run Code Online (Sandbox Code Playgroud)

Vagrant版本:

C:\scratch\vagrant>vagrant -v
Vagrant 1.5.4
Run Code Online (Sandbox Code Playgroud)

tma*_*lai 16

正如@Emyl指出的那样,你的盒子名称中有一个拼写错误(应该是"hashicorp/precise32").

作为问题的答案,Vagrant支持主机上的标准HTTP_PROXYHTTPS_PROXY环境变量.在Windows上,您可以在命令行上使用以下命令设置它们:

set HTTP_PROXY="http://proxy:1234"
set HTTPS_PROXY="http://proxy:1234"
Run Code Online (Sandbox Code Playgroud)

计划在将来vagrant-proxyconf也可以在某些情况下自动设置它们.

  • 使用双引号它对我不起作用。我必须把它们去掉。 (2认同)

小智 8

为我工作,但没有双引号.

set HTTP_PROXY=http://proxy:1234
set HTTPS_PROXY=http://proxy:1234
Run Code Online (Sandbox Code Playgroud)

代替 :

set HTTP_PROXY="http://proxy:1234"
set HTTPS_PROXY="http://proxy:1234"
Run Code Online (Sandbox Code Playgroud)