My company's network is using proxy. So when I use vagrant up
, it showed me a 401 permission error.
How can I do some setting to use vagrant?
My company's network is using proxy. So when I use vagrant up
, it showed me a 401 permission error.
How can I do some setting to use vagrant?
Installing proxyconf will solve this, but behind a proxy you can't install a plugin simply using the command
vagrant plugin install
, Bundler will raise an error.set your proxy in your environment if you're using a unix like system
or get a more detailed answer here: How to use bundler behind a proxy?
after this set up proxyconf
Install proxyconf:
Configure your Vagrantfile:
Some Special characters in the password create problem in proxy. Either escape them or avoid having special characters in password.
If your proxy requires authentication it is better to set the environment variable rather than storing your password in the Vagrantfile. Also your Vagrantfile can be used by others easily who are not behind a proxy.
For Mac/Linux (in Bash)
then
For Windows use set instead of export.
then
On windows, you must set a variable to specify proxy settings, download the vagrant-proxyconf plugin: (replace {PROXY_SCHEME}(http:// or https://), {PROXY_IP} and {PROXY_PORT} by the right values)
After that, you can add the plugin to hardcode your proxy settings in the vagrant file
and then you can provide config.proxy.xxx settings in your Vagrantfile to be independent against environment settings variables
On a Windows host
open a CMD prompt;
Substitute the address and port in the above snippets to whatever is appropriate for your situation. The above will remain set until you close the CMD prompt. If it works for you, consider adding them permanently to your environment variables so that you won't have to set them every time you open a new CMD prompt.