简体   繁体   English

当我使用 vscode Remote-SSH 扩展连接到我的远程服务器时,我发现 vscode 无法在主机上安装 vscode-server

[英]When I use vscode Remote-SSH extension to connect to my remote server, I found vscode cannot install vscode-server on host

this is the log when vscode install vscode-server in host这是 vscode 在主机中安装 vscode-server 时的日志

i found that it got vscode-server commit id as follow log:我发现它得到了 vscode-server commit id 如下日志:

[13:07:27.334] Using commit id "f80445acd5a3dadef24aa209168452a3d97cc326" and quality "stable" for server

but it didn't use this commit id in wget download url:但它没有在 wget 下载 url 中使用此提交 ID:

[13:07:28.420] > wget download failed
> https://update.code.visualstudio.com/commit:/server-darwin/stable:
[13:07:27.297] Log Level: 2
[13:07:27.298] remote-ssh@0.74.0
[13:07:27.298] darwin x64
[13:07:27.306] SSH Resolver called for "ssh-remote+devbox", attempt 1
[13:07:27.307] "remote.SSH.useLocalServer": true
[13:07:27.307] "remote.SSH.path": undefined
[13:07:27.308] "remote.SSH.configFile": undefined
[13:07:27.308] "remote.SSH.useFlock": true
[13:07:27.308] "remote.SSH.lockfilesInTmp": false
[13:07:27.308] "remote.SSH.localServerDownload": off
[13:07:27.309] "remote.SSH.remoteServerListenOnSocket": false
[13:07:27.309] "remote.SSH.showLoginTerminal": false
[13:07:27.309] "remote.SSH.defaultExtensions": []
[13:07:27.309] "remote.SSH.loglevel": 2
[13:07:27.310] "remote.SSH.enableDynamicForwarding": true
[13:07:27.310] "remote.SSH.enableRemoteCommand": false
[13:07:27.310] "remote.SSH.serverPickPortsFromRange": {}
[13:07:27.310] "remote.SSH.serverInstallPath": {}
[13:07:27.325] SSH Resolver called for host: devbox
[13:07:27.325] Setting up SSH remote "devbox"
[13:07:27.330] Acquiring local install lock: /var/folders/8f/x1b597tj715cn0x95bjqmy1m0000gp/T/vscode-remote-ssh-c4ea1055-install.lock
[13:07:27.333] Looking for existing server data file at /Users/bytedance/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-c4ea1055-f80445acd5a3dadef24aa209168452a3d97cc326-0.74.0/data.json
[13:07:27.334] Using commit id "f80445acd5a3dadef24aa209168452a3d97cc326" and quality "stable" for server
[13:07:27.340] Install and start server if needed
[13:07:27.344] PATH: /Users/bytedance/.yarn/bin:/Users/bytedance/.config/yarn/global/node_modules/.bin:/Users/bytedance/.nvm/versions/node/v14.15.1/bin:/Users/bytedance/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/puppetlabs/bin:/Library/Apple/usr/bin:/Applications/Mplus
[13:07:27.345] Checking ssh with "ssh -V"
[13:07:27.359] > OpenSSH_8.6p1, LibreSSL 2.8.3

[13:07:27.369] askpass server listening on /var/folders/8f/x1b597tj715cn0x95bjqmy1m0000gp/T/vscode-ssh-askpass-efdbcc89680acf75582ff2c0e6d258ff60bbf93f.sock
[13:07:27.369] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/8f/x1b597tj715cn0x95bjqmy1m0000gp/T/vscode-ssh-askpass-340d49ea7f83ee5441ed6e4eecae6d815a8c993e.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","63970","-o","ConnectTimeout=15","devbox"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/bytedance/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-c4ea1055-f80445acd5a3dadef24aa209168452a3d97cc326-0.74.0/data.json"}
[13:07:27.370] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/bytedance/.vscode/extensions/ms-vscode-remote.remote-ssh-0.74.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/bytedance/.vscode/extensions/ms-vscode-remote.remote-ssh-0.74.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/8f/x1b597tj715cn0x95bjqmy1m0000gp/T/vscode-ssh-askpass-efdbcc89680acf75582ff2c0e6d258ff60bbf93f.sock"}
[13:07:27.371] Spawned 14057
[13:07:27.515] > local-server-1> Spawned ssh, pid=14064
[13:07:27.520] stderr> OpenSSH_8.6p1, LibreSSL 2.8.3
[13:07:27.596] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:b+9mK6ATDvqmXeFeXiRzqh4iICIEtuNptAfPeSuV4sI
[13:07:27.953] stderr> Authenticated to 10.227.84.41 ([10.227.84.41]:22).
[13:07:28.012] > Linux n227-084-041 4.14.81.bm.15-amd64 #1 SMP Debian 4.14.81.bm.15 Sun Sep 8 05:02:31 UTC 2019 x86_64
> 
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
> 
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
[13:07:28.023] > ready: f8c7ecb7b7c3
[13:07:28.033] > Linux 4.14.81.bm.15-amd64 #1 SMP Debian 4.14.81.bm.15 Sun Sep 8 05:02:31 UTC 2019
[13:07:28.034] Platform: linux
[13:07:28.046] stderr> bash: line 1: syntax error near unexpected token `done'
[13:07:28.046] stderr> bash: line 1: `done'
[13:07:28.048] > Installing to ...
[13:07:28.048] stderr> zsh: parse error near `}'
[13:07:28.051] > f8c7ecb7b7c3%%1%%
[13:07:28.051] stderr> do_host_download:1: command not found: millis
[13:07:28.054] > Downloading with wget
[13:07:28.420] > wget download failed
> https://update.code.visualstudio.com/commit:/server-darwin/stable:
> 2022-02-23 13:07:30 ERROR 404: Not Found.

I had this problem as well since this morning and what was odd for me was that I could SSH from the terminal to the target host with no problem.从今天早上开始,我也遇到了这个问题,对我来说奇怪的是,我可以毫无问题地从终端 SSH 到目标主机。

After some debugging, it seems like the Remote - SSH extension is causing the trouble.经过一些调试后,似乎Remote - SSH扩展引起了麻烦。 The following two options worked for me.以下两个选项对我有用。 Either:任何一个:

  1. Downgrading the extension to 0.70.0 works for me.将扩展降级到 0.70.0 对我有用。 The current version (0.74.0 as of now) was updated just two days ago and I think this update is causing the trouble.当前版本(截至目前为 0.74.0)仅在两天前更新,我认为此更新导致了问题。

  2. If you would like to keep the current version, then turning off remote.ssh.useLocalServer also works.如果您想保留当前版本,则关闭remote.ssh.useLocalServer也可以。 If you're on a mac, go to Code > Preferences > Settings ( Cmd + , ) and then type remote.ssh.useLocalServer and it'll show the option which is turned on by default.如果您使用的是 Mac,请输入 go 代码 > 首选项 > 设置 ( Cmd + , ),然后键入remote.ssh.useLocalServer ,它会显示默认打开的选项。 Turning this off did the trick for me too.关闭它对我也有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 与服务器建立远程 ssh 连接后,vscode-server 似乎没有完成安装 - After Establishing a Remote-ssh connection to the server, it appears the vscode-server does not finish the installation 当没有 Internet 连接时,如何将扩展安装到作为 Remote-SSH 远程端的 VS Code 服务器中? - How do you install an extension into the VS Code Server that's the remote end of Remote-SSH when there is no Internet connection? 无法使用 VS Code 连接到远程服务器 - 远程 SSH 扩展 - Cannot connect to remote server using VS Code - remote SSH extension vscode,当远程服务器要求在密码前输入otp时连接失败 - vscode, fail to connect when remote server asking for entering otp before password vscode服务器启动SSH失败 - The vscode server failed to start SSH Sh 奇怪的命令 output - vscode 远程 ssh - Sh weird command output - vscode remote ssh vscode 远程 ssh 和 Linux 有一个 memory 问题 - vscode remote ssh with Linux has a memory issue vscode无法连接远程 Linux (_WebSocket close with status code 1006) - Vscode cannot connect to remote Linux (_WebSocket close with status code 1006) 通过 VSCode Remote SSH 连接到 ec2 实例时出错 - Error while Connecting to a ec2 instance through VSCode Remote SSH VSCode SSH 远程,Jupyter 笔记本无法运行 - VSCode SSH remote, Jupyter notebook couldn't run
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM