2015-10-13 63 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)'!