getting proxy authentication error while installing vagrant-proxycong

306 views
Skip to first unread message

sanjiv...@gmail.com

unread,
Aug 31, 2016, 1:46:08 AM8/31/16
to Vagrant
Hello,

In my environment, we a have a corp proxy enabled for internet access. I have HTTP_PROXY and HTTPS_PROXY set to http://abc.xyz.com:9999. This setting enables me to download other packages from the internet but vagrant fails:

bash-3.2$ vagrant plugin install vagrant-proxyconf

Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...

/opt/vagrant/embedded/lib/ruby/2.2.0/net/http/response.rb:119:in `error!': 407 "AuthorizedOnly" (Net::HTTPServerException)


I set http_proxy and https_proxy to include user:password using the format http://<username>:<password>abc.xyz.com:9999


I'm getting invalid URI error:


URI::InvalidURIError)

from /opt/vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:72:in `parse'



What's wrong with my proxy URI above?


Thanks,

Sanjiv



Alvaro Miranda Aguilera

unread,
Aug 31, 2016, 1:25:55 PM8/31/16
to vagra...@googlegroups.com
try setting

http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY

to:

 http://<username>:<password>@abc.xyz.com:9999

There is an _@_ ^

sanjiv...@gmail.com

unread,
Sep 1, 2016, 11:54:12 AM9/1/16
to Vagrant
I set these to:

http://foo16:Barxyz\$7#@abc.xyz.com:9999

Note that foo16 is user name. Barxyz$7# is password, it have '\' for escape sequence for $ (otherwise it will omit '$7'the substring  from the password)

I still get the bad URI error:

bash-3.2$ vagrant plugin install vagrant-proxyconf

Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...

/opt/vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:66:in `split': bad URI(is not URI?): http://foo16:Barxyz$7#@abc.xyz.com:9999 (URI::InvalidURIError)

    from /opt/vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:72:in `parse'

    from /opt/vagrant/embedded/lib/ruby/2.2.0/uri/common.rb:226:in `parse'

    from /opt/vagrant/embedded/lib/ruby/2.2.0/uri/common.rb:713:in `URI'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/vendor/net/http/persistent.rb:908:in `proxy_from_env'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/vendor/net/http/persistent.rb:858:in `proxy='

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/vendor/net/http/persistent.rb:528:in `initialize'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/fetcher.rb:237:in `new'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/fetcher.rb:237:in `connection'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/fetcher.rb:81:in `initialize'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:232:in `new'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:232:in `block in fetchers'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:230:in `map'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:230:in `fetchers'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/source/rubygems.rb:336:in `block in remote_specs'

    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/index.rb:10:in `build'

Alvaro Miranda Aguilera

unread,
Sep 1, 2016, 12:09:18 PM9/1/16
to vagra...@googlegroups.com
any chance you can change the password?

So you can test is not the escape, etc.

In this case, Vagrant use ruby and other undelying tools like curl, however if the password is causing issues, i think the best will be just have a new password.


Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/eb12dec3-c318-4f0b-8a6e-ab51c4e76d8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages