rubygems/rubygems.org — Issue #391: Issue with authentication with proxy
Author: tysonite
Created: 2012-01-25 13:04:24+00:00
State: open

I try to authenticate on proxy using the following method:
export http_proxy='http://DOMAIN\login:password@192.168.205.2:8080'

and it doesn't work with the following message:
[root@host]# gem update
Updating installed gems
ERROR: While executing gem ... (URI::InvalidURIError)
bad URI(is not URI?): http://DOMAIN\login:password@192.168.205.2:8080

However, if I exclude "DOMAIN\" string from http_proxy variable it tries to authenticate, but fails (because proxy requires domain name to be included for the user):

[root@host]# export http_proxy='http://login:password@192.168.205.2:8080'
[root@host]# gem update
Updating installed gems
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Proxy Authentication Required 407 (http://rubygems.org/latest_specs.4.8.gz)

I guess that proxy settings parser should be extended to understand domain name.

rubygems version is
[root@host]# gem -v
1.8.15