wsl ubuntu vscode 报无法验证证书

        今天在wsl ubuntu里面运行code. 的时候报下面的错误信息

root@DESKTOP-68F1OMN:/data/tencent/weda# code .
Updating VS Code Server to version 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Removing previous installation...
Installing VS Code Server for Linux x64 (848b80aeb52026648a8ff9f7c45a9b0a80641e2e)
Downloading: 100%
Failed
--2025-06-01 12:01:53--  https://update.code.visualstudio.com/commit:848b80aeb52026648a8ff9f7c45a9b0a80641e2e/server-linux-x64/stable
Resolving update.code.visualstudio.com (update.code.visualstudio.com)... 13.107.246.50, 2620:1ec:bdf::50
Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|13.107.246.50|:443... connected.
ERROR: cannot verify update.code.visualstudio.com's certificate, issued by ‘CN=Microsoft Azure RSA TLS Issuing CA 08,O=Microsoft Corporation,C=US’:
  Self-signed certificate encountered.
To connect to update.code.visualstudio.com insecurely, use `--no-check-certificate'.
ERROR: Failed to download https://update.code.visualstudio.com/commit:848b80aeb52026648a8ff9f7c45a9b0a80641e2e/server-linux-x64/stable to /root/.vscode-server/bin/848b80aeb52026648a8ff9f7c45a9b0a80641e2e-1748750512.tar.gz
Please install missing certificates.
Debian/Ubuntu:  sudo apt-get install ca-certificates

        由于我的ubuntu无法认证SSL导致下载失败

最后解决方法如下

wget https://update.code.visualstudio.com/commit:848b80aeb52026648a8ff9f7c45a9b0a80641e2e/server-linux-x64/stable -O vscode-server.tar.gz
mkdir -p ~/.vscode-server/bin/848b80aeb52026648a8ff9f7c45a9b0a80641e2e
tar -xzf vscode-server.tar.gz -C ~/.vscode-server/bin/848b80aeb52026648a8ff9f7c45a9b0a80641e2e --strip-components=1

在运行

code .

可以重新使用VS Code了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

livepy

老码农,赋闲在家要吃饭

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值