尝试安装VSCODE扩展时获取连接ETIMEDOUT

Dro*_*ror 9 visual-studio-code

当尝试从市场安装VSCODE扩展时,我可能由于公司防火墙限制而连接ETIMEDOUT xxx.xxx.xxx.xxx:443.

有没有办法从本地驱动器下载和安装扩展?我在VSCODE市场上找不到"下载"选项.

小智 16

您需要将公司代理添加到VSCode设置.

步骤1. 打开文件>首选项>用户设置

第2步.

将下面的复制并粘贴到settings.json(打开的文件)中,确保在大括号{}内

//-------- HTTP configuration --------

// The proxy setting to use. If not set will be taken from the http_proxy and https_proxy environment variables
"http.proxy": "http://127.0.0.1:8080", //your corporate proxy

// Whether the proxy server certificate should be verified against the list of supplied CAs.
"http.proxyStrictSSL": false
Run Code Online (Sandbox Code Playgroud)

步骤3. 按F1并键入Reload Window,然后按enter键刷新.

提示:如果您不知道公司代理设置,请遵循以下建议:https: //superuser.com/questions/346372/how-do-i-know-what-proxy-server-im-using


Wad*_*son 6

这是你可以做的.

大多数扩展都在公共回购中.单击侧面板上的"入门".

在此输入图像描述

从公共仓库下载代码.

按照文档中的说明侧载应用程序.

如果您想私下与他人共享您的扩展或自定义,您只需向他们发送生成器输出的副本,并要求他们将其添加到.vscode/extensions文件夹下.或者,使用vsce发布工具打包您的扩展,并将它们发送给.vsix文件.


Vla*_*den 5

将代理配置添加到 VS Code

  1. 以管理员身份打开 VS Code
  2. 打开文件 > 首选项 > 用户设置
  3. 将以下配置添加到打开的文件中。
{
  "http.proxy": "http://userName:password@companyProxyURL:portNumber",
  "http.proxyStrictSSL": false
}
Run Code Online (Sandbox Code Playgroud)