使用 VSCode ssh 远程连接服务器时卡在 "Downloading VS Code Server"
2023-10-11
进行远程连接时,尝试在服务器下载 Remote-SSH 的服务端失败了,极大概率是国内网络的原因。
1 | Server download failed |
解决方法 1(自动)
如果本机有代理工具的话,可以将 VS Code 配置的 Remote.SSH: Local Server Download 设置为 always。这样它会在本地下载 VSCode Server,然后通过 scp 上传到服务器上。
解决方法 2(手动)
使用以下命令后,看看 VSCode 下载的是哪个 commit-id 的版本:
1 | ls ~/.vscode-server/bin |
接着手动下载那个版本的 VSCode Server,然后解压到
~/.vscode-server/bin/<commit-id>
目录下。
1 | commit_id=f06011ac164ae4dc8e753a3fe7f9549844d15e35 |