如何从代理后面更新 Ruby Gems (ISA-NTLM) [英] How do I update Ruby Gems from behind a Proxy (ISA-NTLM)
问题描述
我所使用的防火墙在仅 NTLM 模式下运行 Microsoft ISA 服务器.哈希有人成功通过 Ruby SSPI gem 或其他方法安装/更新他们的 Ruby gem 吗?
The firewall I'm behind is running Microsoft ISA server in NTLM-only mode. Hash anyone have success getting their Ruby gems to install/update via Ruby SSPI gem or other method?
...还是我懒惰?
注意:rubysspi-1.2.4 不起作用.
Note: rubysspi-1.2.4 does not work.
这也适用于 IronRuby 项目的一部分igem"
This also works for "igem", part of the IronRuby project
推荐答案
我无法通过命令行开关使我的工作正常工作,但我可以通过设置我的 HTTP_PROXY代码>环境变量.(请注意,大小写似乎很重要).我有一个批处理文件,里面有这样一行:
I wasn't able to get mine working from the command-line switch but I have been able to do it just by setting my HTTP_PROXY
environment variable. (Note that case seems to be important). I have a batch file that has a line like this in it:
SET HTTP_PROXY=http://%USER%:%PASSWORD%@%SERVER%:%PORT%
我显然在到达这一行之前设置了四个引用变量.例如,如果我的用户名是wolfbyte",我的密码是secret",我的代理被称为pigsy"并且在端口 8080 上运行:
I set the four referenced variables before I get to this line obviously. As an example if my username is "wolfbyte", my password is "secret" and my proxy is called "pigsy" and operates on port 8080:
SET HTTP_PROXY=http://wolfbyte:secret@pigsy:8080
您可能需要小心如何管理它,因为它在机器的会话中以纯文本形式存储您的密码,但我认为这应该不是什么大问题.
You might want to be careful how you manage that because it stores your password in plain text in the machine's session but I don't think it should be too much of an issue.
这篇关于如何从代理后面更新 Ruby Gems (ISA-NTLM)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!