我后面的防火墙以ntlm模式运行Microsoft ISA服务器。哈希任何人成功地获得他们的Ruby宝石安装/更新通过Ruby SSPI宝石或其他方法?
... 还是我太懒了?
注意:rubysspi-1.2.4不起作用。
这也适用于“igem”,IronRuby项目的一部分
我后面的防火墙以ntlm模式运行Microsoft ISA服务器。哈希任何人成功地获得他们的Ruby宝石安装/更新通过Ruby SSPI宝石或其他方法?
... 还是我太懒了?
注意:rubysspi-1.2.4不起作用。
这也适用于“igem”,IronRuby项目的一部分
当前回答
这完美地解决了我的问题:
gem install -p http://proxy_ip:proxy_port compass
你可能需要添加你的用户名和密码:
gem install -p http://[username]:[password]@proxy_ip:proxy_port compass
其他回答
我在一个代理后面工作,刚刚通过直接从http://rubygems.org下载安装了SASS。
然后我运行sudo gem install [path/to/ downloads /gem/file]。我不能说这对所有宝石都适用,但它可能会帮助一些人。
一个解决方案是在本地机器上安装http://web.archive.org/web/20060913093359/http://apserver.sourceforge.net:80/,配置它并通过这个代理运行gems。
安装:只需下载apserver 097(而不是实验性的098!)并解压。 配置:编辑server.cfg文件,将MS代理的值放在PARENT_PROXY和PARENT_PROXY_PORT中。输入DOMAIN和USER的值。将PASSWORD保留为空(冒号后没有任何内容)-启动时将提示您。 执行命令apserver: cd aps097;python main.py 运行Gems: gem install-http-proxy http://localhost:5865/ library
这对我来说在Windows盒子里很管用:
set HTTP_PROXY=http://server:port
set HTTP_PROXY_USER=username
set HTTP_PROXY_PASS=userparssword
set HTTPS_PROXY=http://server:port
set HTTPS_PROXY_USER=username
set HTTPS_PROXY_PASS=userpassword
我有一个包含这些行的批处理文件,当我需要它时,我用它来设置环境值。
在我的例子中,诀窍是HTTPS_PROXY集。没有它们,我总是得到一个407代理身份验证错误。
对于任何使用SSH隧道的人;你可以创建一个使用SOCKS代理的gem命令版本:
Install socksify with gem install socksify (you'll need to be able to do this step without proxy, at least) Copy your existing gem exe cp $(command which gem) /usr/local/bin/proxy_gem Open it in your favourite editor and add this at the top (after the shebang) require 'socksify' if ENV['SOCKS_PROXY'] require 'socksify' host, port = ENV['SOCKS_PROXY'].split(':') TCPSocket.socks_server = host || 'localhost' TCPSocket.socks_port = port.to_i || 1080 end Set up your tunnel ssh -D 8123 -f -C -q -N user@proxy Run your gem command with proxy_gem SOCKS_PROXY=localhost:8123 proxy_gem push mygem
rubysspi-1.3.1适用于我的Windows 7,使用这一页的说明:
http://www.stuartellis.eu/articles/installing-ruby/