【问题标题】:unable to get local issuer certificate vscode无法获取本地颁发者证书 vscode
【发布时间】:2023-04-01 22:55:01
【问题描述】:

我正在尝试为 VSCode 安装扩展。但是无法获得本地发行人证书。 我的settings.json

    // Place your settings in this file to overwrite the default settings { // Controls the font family.
"editor.fontFamily": "Consolas",

    // Controls the font size.
"editor.fontSize": 12,

    //Setting corporate proxy
"http.proxy": "http://proxy_servr:3128",
"https.proxy": "http://proxy_servr:3128",

    //Disable SSL Verification
"http.proxyStrictSSL": false }

【问题讨论】:

    标签: proxy visual-studio-code corporate


    【解决方案1】:

    在 VS 代码中: 单击文件->首选项->设置

    {
    "http.proxyStrictSSL":false,
    "http.proxy":"http://USERID:PASSWORD@proxy.domain.com:3128"
    }
    

    您似乎没有向 http.proxy 添加身份验证凭据

    【讨论】:

      【解决方案2】:

      编辑%AppData%/Roaming/Code/User/settings.json,添加:

      {
          ...
          "http.proxyStrictSSL":false,
          ...
      }
      

      【讨论】:

        【解决方案3】:

        以上所有答案都存在安全风险,因为您是从互联网下载而没有检查Server Certificate Chain 是否正确。使用此类做法会打开您希望避免的不同 hack possibilities

        更好的方法是在您的系统上正确配置服务器证书链(这因操作系统而异)并从您的设置中删除配置 "http.proxyStrictSSL":false,

        要使其与扩展安装一起使用,我发现您必须覆盖扩展的“代理支持”。奇怪的是,“on”对我不起作用。

        现在有了这个配置,我可以在主机上安全地下载扩展,就像在用于远程执行的 docker 容器中一样。

        【讨论】:

          猜你喜欢
          • 2016-04-20
          • 1970-01-01
          • 2017-08-31
          • 2018-07-04
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-03-01
          • 2021-03-10
          相关资源
          最近更新 更多