在 MacO 上使用 vs 代码时如何解决“下载 VS 代码服务器失败”

Leo*_*ang 3 visual-studio-code

我想在 VS 代码上使用远程开发,但它有以下错误

SSH Resolver called for "ssh-remote+kf"
SSH Resolver called for host: kf
Setting up SSH remote "kf"
Using commit id "daf71423252a707b8e396e8afa8102b717f8213b" and quality "insider" for server
Install and start server if needed
> bash: no job control in this shell
> Installing...
> Downloading with wget
> ERROR: certificate common name “*.azurewebsites.net” doesn’t match requested host name “update.code.visualstudio.com”. To connect to update.code.visualstudio.com insecurely, use ‘--no-check-certificate’.
> 1931c79d-3297-4f42-9eb5-6f8f91556ed9##25##
"install" terminal command done
Received install output: 1931c79d-3297-4f42-9eb5-6f8f91556ed9##25##
Server download failed
Downloading VS Code Server failed. Please try again later.
Run Code Online (Sandbox Code Playgroud)

以及如何使用“无检查证书”来 wget VS Code Server?

小智 7

添加一行:

check-certificate=off

.wgetrc用户主目录下的文件。

注意:它将禁用您使用的所有 wget 命令的 SSL 证书检查,除非您将其更改为:

check-certificate=on


小智 6

如果您使用代理,在您的主目录中创建一个名为.wgetrc的文件并添加以下行:

use_proxy=on
http_proxy=http://<my-proxy.company.net:port>
https_proxy=http://<my-proxy.company.net:port>
Run Code Online (Sandbox Code Playgroud)

如果需要,一次性添加:

check-certificate=off

注意:不建议禁用证书检查,因为它可能是一个安全威胁。

  • 我一直面临这个问题,只有 check-certificate=off line 对我有用。谢谢! (2认同)

小智 1

今天早上我遇到了同样的问题。我有一些技巧可以解决。

我有另一台装有Linux的机器,它可以正确连接到互联网。我通过远程 ssh 连接成功连接到 Linux 机器。我检查了主文件夹,发现了一个名为 的文件夹.vscode-remote。我将此文件夹复制到遇到此问题的计算机的主路径,并且它有效。