首页 > 解决方案 > 如何使用 VPN 和代理安装 Vagrant 插件?

问题描述

我的主机是 Windows 10 Pro。我前段时间在上面安装了 vagrant。现在我使用 VPN 和代理,我想安装vagrant-proxyconf插件。这是一个结果:

vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
Vagrant failed to load a configured plugin source. This can be caused
by a variety of issues including: transient connectivity issues, proxy
filtering rejecting access to a configured plugin source, or a configured
plugin source not responding correctly. Please review the error message
below to help resolve the issue:

  timed out (https://gems.hashicorp.com/specs.4.8.gz)

Source: https://gems.hashicorp.com/

当我禁用 VPN 和代理时,插件安装正确。似乎 vagrant 不使用系统代理,我必须在 vagrant 配置中的某处设置代理,但我不知道该怎么做。我用谷歌搜索了这个问题,但我发现来宾机器上的代理存在问题。

我的问题仅涉及主机和插件安装。我对客人也有问题,但这是单独的问题。

标签: vagrant

解决方案


我设置了 http_proxy 环境变量并正确安装了插件。

set http_proxy=http://yourproxyserver:port

我在这里找到了解决方案


推荐阅读