如何从代理 (ISA-NTLM) 后面更新 Ruby Gems [英] How do I update Ruby Gems from behind a Proxy (ISA-NTLM)

查看:20
本文介绍了如何从代理 (ISA-NTLM) 后面更新 Ruby Gems的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所使用的防火墙正在以仅 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?

...还是我只是懒惰?

... or am I just being lazy?

注意: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.

这篇关于如何从代理 (ISA-NTLM) 后面更新 Ruby Gems的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆