繁体   English   中英

如何在vagrant的代理后面安装代理插件

[英]How to install the proxy plugin behind a proxy for vagrant

我在限制性代理网络上工作,目前我在笔记本电脑上工作。 我不得不使用代理插件,我不得不从我的工作网络安装它。

我现在在桌面上 - 这是不可能的(在Windows上),我正在尝试配置流浪汉。 我怀疑我应该键入的命令是:

vagrant plugin install --plugin-source http://rubygems.org vagrant-proxyconf

报道的是:

Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

Could not fetch specs from http://gems.hashicorp.com/

Warning: this Gemfile contains multiple primary sources. Using `source`
more than once without a block is a security risk, and may result in 
installing unexpected gems. To resolve this warning, use a block to 
indicate which gems should come from the secondary source. To upgrade
this warning to an error, run `bundle config disable_multisource true`.

我假设这与代理问题有关。 我已经尝试过cmdPowerShell以及它

set http_proxy=xxxxx:80

有什么建议? 如果可能的话,我很乐意进行手动安装。

谢谢!

您需要在Vagrant主机中设置代理环境变量,以便它知道如何下载插件。

例如:

$ export http_proxy=http://192.0.2.1:3128
$ export https_proxy=http://192.0.2.1:3128

$ env | grep http  # just checking
http_proxy=http://192.0.2.1:3128
https_proxy=http://192.0.2.1:3128

$ vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
Installed the plugin 'vagrant-proxyconf (1.5.2)'!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM