Vscode-remote-release: When I enable Remote-SSH extension in workspace锛孖 can not connect to my remote server.

Created on 8 Oct 2019  路  6Comments  路  Source: microsoft/vscode-remote-release

When I enable Remote-SSH extension in workspace锛孖 can not connect to my remote server.
The VS Code gives me these errors:

  1. Failed to connect to the remote extension host server (Error: No remote extension installed to resolve ssh-remote.)
  2. Resolving the authority ssh-remote failed
    But when I enable the Remote-SSH extension globally, it works well.
  • VSCode Version:
    Version: 1.38.1 (system setup)
    Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0
    Date: 2019-09-11T13:35:15.005Z
    Electron: 4.2.10
    Chrome: 69.0.3497.128
    Node.js: 10.11.0
    V8: 6.9.427.31-electron.0
    OS: Windows_NT x64 10.0.18362

  • Local OS Version: Windows 10 Professional 1903 18362.387

  • Remote OS Version: CentOS 7.5.1804 x64

  • Remote Extension/Connection Type: SSH

  • Remote Extension Version:0.46.1

Steps to Reproduce:

  1. Disable the Remote-SSH extension globally.
  2. Enable the Remote-SSH extension in the workspace.
  3. Connect to the remote server and it gives the errors above.

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

extensions feature-request

All 6 comments

It will have to be enabled globally. The thing is, you need it to run before you have even opened a workspace, because it is the thing connecting you to the workspace.

FYI @sandy081 maybe we could prevent users from doing this somehow.

@roblourens Why is it required to have extension enabled globally? It should work even if it is enabled at workspace level.

This issue https://github.com/microsoft/vscode-remote-release/issues/431 supports disabling resolver extensions.

If you say it should work, then maybe it should. But I would assume we don't figure out which extensions are workspace-enabled until a workspace is opened. I'll assign it to you because the extension is just not being loaded in this case: No remote extension installed to resolve ssh-remote

Assigning to Nov for investigation

I've run into this issue as well. I prefer to run VSCode with all extensions Disabled globally and only enable them in workspaces where they make sense (see: microsoft/vscode#85735). This is extremely important for keeping things manageable when you develop across numerous environments with different development requirements.

I attempted to Disable the _Remote - Containers_ extension globally and only enable it in the Workspaces where I intended to use it. They refused to initialize properly, as reported by @yf-9186 in this issue. Re-enabling the extension globally allowed it to work.

A change to allow the extension to only be enabled in specific Workspaces would be very much welcome.

@roblourens comment is true that

It will have to be enabled globally. The thing is, you need it to run before you have even opened a workspace, because it is the thing connecting you to the workspace.

Since remote resolver extensions shall be enabled/disabled globally, I would disable workspace level enablement actions in the UI so that users will not get into this state.

Was this page helpful?
0 / 5 - 0 ratings