How to use vagrant in a proxy environment?

前端 未结 12 917
太阳男子
太阳男子 2020-12-07 08:10

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?

12条回答
  •  天命终不由人
    2020-12-07 08:30

    On a Windows host

    open a CMD prompt;

    set HTTP_PROXY=http://proxy.yourcorp.com:80
    set HTTPS_PROXY=https://proxy.yourcorp.com:443
    

    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.

提交回复
热议问题