microsoft / microsoft/vscode-remote-release

'~' parsing error in windows

Open
#10,599 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Is there an existing issue for this bug?
  • I have searched the existing open issues and found none that apply.
  • If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
  • I have read and performed the troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting
  • My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
  • I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot

I did not ask the @remote-ssh participant for help

In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?

I did not try step 2 of the troubleshooting steps

Remote-SSH Log
Remote-SSH Log

[10:31:12.037] Install and start server if needed
[10:31:12.044] Checking ssh with "C:\Program Files\glzr.io\GlazeWM\cli\ssh.exe -V"
[10:31:12.047] Got error from ssh: spawn C:\Program Files\glzr.io\GlazeWM\cli\ssh.exe ENOENT
[10:31:12.048] Checking ssh with "D:\Scoop\global\shims\ssh.exe -V"
[10:31:12.050] Got error from ssh: spawn D:\Scoop\global\shims\ssh.exe ENOENT
[10:31:12.050] Checking ssh with "D:\Scoop\shims\ssh.exe -V"
[10:31:12.123] > OpenSSH_9.9p1, OpenSSL 3.2.3 3 Sep 2024

[10:31:12.137] Using SSH config file "C:\Users\Weidows/.ssh/config"
[10:31:12.138] Running script with connection command: "D:\Scoop\shims\ssh.exe" -T -D 57451 -F "C:\Users\Weidows/.ssh/config" "DolphinSound-docker-weidows-dev" sh
[10:31:12.140] Generated SSH command: 'type "C:\Users\Weidows\AppData\Local\Temp\vscode-linux-multi-line-command--olphin-ound-docker-weidows-dev-842503072.sh" | "D:\Scoop\shims\ssh.exe" -T -D 57451 -F "C:\Users\Weidows/.ssh/config" "DolphinSound-docker-weidows-dev" sh'
[10:31:12.142] Using connect timeout of 17 seconds
[10:31:12.144] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[10:31:12.492] > [?9001h[?1004h
[10:31:12.493] Got some output, clearing connection timeout
[10:31:12.741] > Can't open user config file C:UsersWeidows/.ssh/config: No such file or directory
> ]0;C:\WINDOWS\System32\cmd.exeConnection closed by UNKNOWN port 65535
> 过程试图写入的管道不存在。
[10:31:14.025] "install" terminal command done
[10:31:14.026] Install terminal quit with output: 过程试图写入的管道不存在。
[10:31:14.026] Received install output: 过程试图写入的管道不存在。
[10:31:14.027] Failed to parse remote port from server output
[10:31:14.030] Resolver error: Error: 
	at v.Create (D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:493431)
	at t.handleInstallOutput (D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:490753)
	at t.tryInstall (D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:608797)
	at async D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:568008
	at async t.withShowDetailsEvent (D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:571256)
	at async P (D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:564794)
	at async t.resolve (D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:568667)
	at async D:\Scoop\persist\vscode\data\extensions\ms-vscode-remote.remote-ssh-0.115.1\out\extension.js:2:839059
[10:31:14.039] ------

Expected Behavior

my ssh setting:

  "remote.SSH.configFile": "~/.ssh/config",

'~' parsed as C:/User/xxx is expected

Actual Behavior

C:\User\xxx, and finally turn to C:UsersWeidows

Steps To Reproduce

config like

  "remote.SSH.configFile": "~/.ssh/config",
Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with handling of the remote.SSH.configFile setting and the Windows path shown in the Remote-SSH log; the generated extension.js stack trace is the only implementation entry point named. Reproduce the issue with ~/.ssh/config and verify that the config path remains valid through SSH invocation and remote connection setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
devtools, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.