[英]How do I get Sublime Text 2 package manager to use my proxy?
I have to work through a proxy at the office and when I press (Ctrl+Shift+P), type Install and try to load a package list, I get the error "Package Control: There are no packages available for installation." 我必须在办公室通过代理工作,当我按下(Ctrl + Shift + P)时,键入Install并尝试加载包列表,我收到错误“包控制:没有可用于安装的包”。
In my 'Package Control.sublime-settings' I have: 在我的'Package Control.sublime-settings'中,我有:
{
"auto_upgrade_last_run": 1345569476,
"http_proxy": "http://user_name:password@<proxy-name>:<proxy_port>"
}
What am I missing OR what is a better option for me to control my system using the proxy. 我错过了什么或者我使用代理控制系统的更好选择。 Once I get home I typically have to disable these proxies.
一旦我回到家,我通常必须禁用这些代理。 Is there a truly system-wide way to make it use a proxy and then disable the proxy with a single command or click?
是否有一种真正的系统范围的方法使它使用代理,然后使用单个命令或单击禁用代理?
Also this is in Ubuntu 12.04. 这也是在Ubuntu 12.04中。
EDIT: Sublime Text Package Manager has been updated to include options for working through a proxy, you can find this in the package settings. 编辑:Sublime文本包管理器已更新,包括通过代理工作的选项,您可以在包设置中找到它。
You do not need the http://
part. 您不需要
http://
部分。 For example: 例如:
"http_proxy": "proxy.my.net:8080",
"https_proxy": "proxy.my.net:8080",
At least, this works for me, on Ubuntu and on Windows also. 至少,这适用于我,在Ubuntu和Windows上。
The first time, I was able to sort out problems with Package Manager by using HTTP instead of HTTPS, as in 第一次,我能够通过使用HTTP而不是HTTPS来解决Package Manager的问题
http://alensiljak.blogspot.co.at/2012/11/setting-up-portable-sublime-text-2.html http://alensiljak.blogspot.co.at/2012/11/setting-up-portable-sublime-text-2.html
The default setup seem to respect the system proxy settings and work through the proxy without explicitely setting "http_proxy", "proxy_username", and "proxy_password". 默认设置似乎遵循系统代理设置并通过代理工作,而无需明确设置“http_proxy”,“proxy_username”和“proxy_password”。
Hopefully this helps. 希望这会有所帮助。
More details on various settings at (for the record, as you've already referred to these): 关于各种设置的更多细节(对于记录,正如您已经提到过的那些):
http://wbond.net/sublime_packages/package_control/settings http://wbond.net/sublime_packages/package_control/settings
Note: This applies to Windows version. 注意:这适用于Windows版本。 I keep the Linux version in the same directory but can't confirm the behaviour currently.
我将Linux版本保留在同一目录中,但无法确认当前的行为。
在Package Control.sublime.settings
添加以下内容在Windows 7上为我工作。
{ "auto_upgrade_last_run": 1345569476, "http_proxy": "user_name:password@<proxy-name>:<proxy_port>" }
我的解决方案是在Package Control设置中更改user_agent,默认情况下是sublime特定于文本的user_agent,但将其更改为(例如)Firefox user_agent,对我有用。
也许这是你尝试过的显而易见的东西,但可能值得一试:你的OS环境中是否设置了http_proxy?
If above answer did not work, I fix it by following steps: 如果以上答案不起作用,我按照以下步骤修复:
Hope it can help you. 希望它可以帮到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.