1

When I try to add source:

C:\>gem source --verbose --add http://gemcutter.org

GET http://gemcutter.org/specs.4.8.gz
407 Proxy Authentication Required
Error fetching http://gemcutter.org:
    bad response Proxy Authentication Required 407 (http://gemcutter.org/specs.4.8.gz)

p.s. my Windows XP client accesses the web via a proxy, so I tried:

C:\>gem -v
1.8.10

C:\>gem source --verbose --http-proxy http://192.168.10.24:3128 --add http://gemcutter.org

but returns the same error. How can I fix it?

ohho
  • 50,879
  • 75
  • 256
  • 383

1 Answers1

3

You need to put the proxy username and password in there somehow.

On *nix machines, gem looks for an environment variable named HTTP_PROXY. You can set this variable on windows too.

Run SET HTTP_PROXY=http://%USER%:%PASSWORD%@192.168.10.24:3128 before you run your gem command.


Another possibility is to install another "proxy" on your computer itself. See How do I update Ruby Gems from behind a Proxy (ISA-NTLM) and http://ntlmaps.sourceforge.net/ for details on this.


You might be able to use rubysspi. See the instructions here.

Community
  • 1
  • 1
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116