【问题标题】:VS Code Remote Development ErrorsVS Code 远程开发错误
【发布时间】:2021-03-11 04:21:36
【问题描述】:

我在我的 Windows 10 桌面上连接到我公司的 VPN,并使用 VS Code 进行开发。我想使用 VS Code 远程开发,这样我就可以连接到我的远程公司开发服务器并直接在服务器上自动保存我的文件。我已经安装了 VS Code 远程开发包,这是我的 SSH 配置。

  Host my.company.server
  HostName 10.XXX.XXX.XX6
  User root
  IdentityFile C:\Users\My_User\Documents\Company\company_key.pem

但是,当将 VS Code 连接到远程服务器时,VS Code 显示我已连接但我收到以下错误并且无法查看远程目录。

Unable to write to Folder Settings because no resource is provided.
Could not fetch remote environment.
Failed to connect to the remote extension host server
(Error: Websocket close with status code 1006)

我尝试使用 WinSCP 连接到远程服务器,效果很好。我还使用 PowerShell 使用以下命令登录,效果也很好。

ssh -i C:\Users\My_User\Documents\Company\company_key.pem root@10.XXX.XXX.XX6

我在这里做错了什么?任何 VS Code 大师都可以帮助我解决这个问题吗?谢谢。

【问题讨论】:

    标签: visual-studio-code vscode-settings vscode-remote


    【解决方案1】:

    VSCode 试图在该远程计算机上下载并安装多个组件,这可能已被贵公司的计算机管理员阻止(因为从外部资源下载通常被视为内部计算机上的安全风险)。

    在做出任何违规行为之前,您应该仔细查看公司的信息安全政策。然后和你的经理讨论,看看是否应该使用 VSCode Remote。

    【讨论】:

      猜你喜欢
      • 2022-11-24
      • 1970-01-01
      • 2021-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多