Proxy 添加代理详细信息后Sublimit3抛出错误
在我的Proxy 添加代理详细信息后Sublimit3抛出错误,proxy,sublimetext3,Proxy,Sublimetext3,在我的sublime3(单机版)中,我运行命令时收到错误: `urllib.error.HTTPError: HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ) ` 我了解,它需要代理设置和凭据,为此,我运行了此命令添加代理信息: impor
sublime3
(单机版)中,我运行命令时收到错误:
`urllib.error.HTTPError: HTTP Error 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
`
我了解,它需要代理设置和凭据,为此,我运行了此命令添加代理信息:
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler({"http":"**http://xxxx:xxxxxx@172.18.18.87:80/**"})) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
完成后,我更新了我的用户设置,如下所示:
{
"installed_packages":
[
"AdvancedNewFile",
"Alignment",
"AngularInject",
"AngularJS",
"Bootstrap 3 Jade Snippets",
"BracketHighlighter",
"EasyDiff",
"Emmet",
"FileDiffs",
"HTML5",
"HTMLBeautify",
"Jade",
"Jade Build",
"Jade Snippets",
"jQuery",
"Open-Include",
"SideBarEnhancements",
"SublimeLinter-jshint",
"Theme - Afterglow",
"Theme - Soda",
"WhoCalled Function Finder"
],
"http_proxy": "http://xxxxxx:xxxxxx@172.18.18.87:80/",
"https_proxy": "http://xxxxxx:xxxxx@172.18.18.87:80/"
}
重新启动sublime3后,我仍然收到相同的错误。如何解决这个问题
有人能帮我整理一下吗?你应该使用专用变量作为代理用户名和密码(
proxy\u用户名
和proxy\u密码
)和http\u代理
/https\u代理
的格式应该是domainname:port
或ip:port
例如:
"http_proxy": "proxyserver:8080",
"https_proxy": "proxyserver:8080", // If http_proxy is set and this settings is not, the value from http_proxy will be used.
"proxy_username": "username",
"proxy_password": "password"
还要仔细检查代理端口,因为80
不是代理的公共端口。并确保您已经安装了curl(例如,apt get install curl
),因为包控制器需要它。
最后检查您的~/.curlrc
文件是否未覆盖任何设置
如果没有任何帮助,则将debug
设置为true
,这样它会将HTTP头和其他调试信息打印到Sublime文本控制台,以便您可以进一步调查问题
请同时检查: