VSCode SSH 远程使用 useLocalServer 参数为 true,但应为 false。

huangapple go评论57阅读模式
英文:

VSCode SSH Remote useLocalServer is true while it should be false

问题

由于某种原因,当我尝试在VSCode中连接到特定主机时,我发现"remote.SSH.useLocalServer"被设置为true,而本地用户设置的JSON中明确设置为false
这导致远程连接崩溃,无法连接到该特定主机,而其他主机正常工作。

在我在主机的~/.vscode-server/data/Machine/settings.json中添加了"remote.SSH.useLocalServer":true并重新加载窗口之前,该主机运行正常。从那时起,当我尝试连接到该主机时,即使我手动使用nano删除了服务器上的"remote.SSH.useLocalServer":true行,连接总是失败并显示错误。

我怀疑这是因为VSCode将主机设置存储在本地某个地方,现在无法访问主机设置。

如何强制远程扩展遵守用户设置?

英文:

For some reason, when I try to connect to a specific host in VSCode, I see that "remote.SSH.useLocalServer" is set to true, while the local user settings JSON has it explicitly set to false.
This makes the remote crash and unable to connect for this specific host, while other hosts are working fine.

The host worked just fine before I added "remote.SSH.useLocalServer":true in the host's ~/.vscode-server/data/Machine/settings.json and reloaded the window. Since then, when I try to connect to the host it always fails with an error, even after I manually deleted the "remote.SSH.useLocalServer":true line from the server using nano.

I suspect this is because VSCode stashed the host settings somewhere locally, and now is unable to access the host because of the settings.

How do I force the remote extension to respect the user settings?
VSCode SSH 远程使用 useLocalServer 参数为 true,但应为 false。

答案1

得分: 0

问题出在服务器的缓存配置上,要修复它,请编辑 AppData\Roaming\Code\CachedConfigurations\user\*REMOTENAME*\configuration.json

英文:

The issue was with the cached configuration of the server, to fix it edit the AppData\Roaming\Code\CachedConfigurations\user\*REMOTENAME*\configuration.json.

huangapple
  • 本文由 发表于 2023年7月13日 23:34:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76681140.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定