6

I am unable to do a vagrant up (or vagrant add) behind our corporate proxy on a Windows 7 machine. I have tried with and without http_proxy/https_proxy environment variables. I tried using the vagrant plugin vagrant-proxyconf with the various http proxy settings but it did not help, the issue isn't with the guest's proxy it is with the host's. Is there some way to get vagrant itself to use a proxy?

Output from 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

Plugins:

C:\scratch>vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-proxyconf (1.2.0)
vagrant-share (1.0.1, system)

Vagrant version:

C:\scratch\vagrant>vagrant -v
Vagrant 1.5.4
2
  • 1
    There's a typo: the correct box name probably is "hashicorp/precise32"
    – Emyl
    Apr 29, 2014 at 14:02
  • Yes that seemd to be the issue Emyl. Thanks for noticing. I had been fighting proxy issues and somewhere along the line made muffed the box name. @tmatilai's answer below using the environment proxy variables worked.
    – Dave Remy
    Apr 30, 2014 at 13:20

2 Answers 2

16

As @Emyl pointed out, you have a typo in the box name (should be "hashicorp/precise32").

As an answer to the question, Vagrant supports the standard HTTP_PROXY and HTTPS_PROXY environment variables on the host. On Windows you can set them on the command line with:

set HTTP_PROXY="http://proxy:1234"
set HTTPS_PROXY="http://proxy:1234"

It's also planned that in the future vagrant-proxyconf could also set them automatically in some cases.

3
  • Yes, typo above and when fixed this worked. Thanks!
    – Dave Remy
    Apr 30, 2014 at 13:21
  • 2
    With the double-quotes it didn't work for me. I have to remove them. Jan 12, 2016 at 13:15
  • Well, how do you know the proxy info is the question??
    – prayagupa
    Sep 15, 2016 at 2:53
11

Worked for me but without the double quotes.

set HTTP_PROXY=http://proxy:1234
set HTTPS_PROXY=http://proxy:1234

instead of :

set HTTP_PROXY="http://proxy:1234"
set HTTPS_PROXY="http://proxy:1234"
1
  • 1
    think this should be the accepted answer as the double quotes will cause an error with vagrant ("unsupported proxy scheme") Jan 7, 2019 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.