2015-10-13 60 views
2

我在一个限制性代理网络上工作,我目前在流动电脑上工作。我不得不使用代理插件,我不得不从我的工作网络安装它。如何在流浪代理的后面安装代理插件

我现在在桌面上 - 这是不可能的(在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

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

谢谢!

+0

你弄清楚如何做到这一点,如果是的话,可以请你分享吗? –

回答

2

您需要在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)'!