简体   繁体   English

如何让Sublime Text 2包管理器使用我的代理?

[英]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: 如果以上答案不起作用,我按照以下步骤修复:

  1. open your Internet Explorer 打开您的Internet Explorer
  2. tools →internet options→ advanced tag→ Security → Cancel the checkbox "Check for Server Certificate revocation" . 工具→互联网选项→高级标签→安全→取消选中“检查服务器证书吊销”复选框。
  3. Restart your Sublime Text 重新启动您的Sublime文本

Hope it can help you. 希望它可以帮到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过Yum软件包管理器安装我的应用程序? - How do I make my application installable via Yum package manager? 在 Sublime Text 中,如何查找和替换文件名 - In Sublime Text, how do I find and replace the file name 如何修复我的SSH配置以在SSH代理后面使用git? - How do I fix my SSH configuration to use git behind an SSH proxy? 如何获取本地代理服务器以将html返回给浏览器? - How do I get my local proxy server to return html to browser? 如何制作自己的包裹? - How do I make my own package? 如何正确配置Sublime Text 3作为git commit消息的默认文本编辑器? - How do I properly configure Sublime Text 3 as the default text editor for git commit messages? 如果是基于 RHEL 的发行版,我如何检查使用了哪个软件 package 管理器,使用 python - In case of RHEL based distribution how do I check which software package manager is used, using python 在Sublime Text 3中,我可以将选择的do文件发送到Stata吗? - In Sublime Text 3, can I send a selection of a do file to Stata? 我似乎无法让SDL处理出色的文本 - I cannot seem to get SDL to work with sublime text 如何使用MonoDevelop打包我的linux应用程序? - How do I package my linux application using MonoDevelop?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM