| name | vscode-server-bootstrap |
| description | Diagnose and preinstall the VS Code Stable Server on a Linux or Windows Remote-SSH host when automatic downloads fail behind a proxy. |
VS Code CLI 和 Server Bootstrap
Use this skill only for the repository's supported scope: a Linux or Windows remote host, VS Code Stable, Remote-SSH Exec Server mode, default ~/.vscode-server, and x64 or arm64.
Objective
Determine the exact VS Code commit required by Remote-SSH, verify that the remote host is in scope, and run install-vscode-server.py without guessing or expanding the installer interface.
Procedure
-
On machine A, obtain the commit from code --version. Prefer the Using commit id "..." and quality "stable" line in the Remote - SSH output when available.
-
Reject ordinary semantic versions such as 1.xx.x; the installer requires the 40-character commit.
-
On machine B, verify one supported environment:
- Linux:
uname -s is Linux; uname -m is x86_64, amd64, aarch64, or arm64.
- Windows PowerShell:
[System.Environment]::OSVersion.Platform identifies Windows; $env:PROCESSOR_ARCHITECTURE is AMD64 or ARM64.
- Python is 3.8 or newer.
-
Inspect HTTPS_PROXY, https_proxy, HTTP_PROXY, http_proxy, ALL_PROXY, and all_proxy. Never print proxy passwords. Do not invent a proxy value.
-
Confirm curl or curl.exe is available when practical. The installer prefers curl and falls back to Python urllib.
-
Run one of:
python3 install-vscode-server.py <commit>
py -3 .\install-vscode-server.py <commit>
-
Confirm the platform-specific files exist:
- Linux:
node and bin/code-server.
- Windows:
node.exe and bin/code-server.cmd.
-
Ask the user to retry Remote-SSH and inspect its output. Success means it reuses the existing server rather than downloading the full server again.
Diagnostic rules
- If the log says
quality "insider", stop: unsupported.
- If
remote.SSH.useExecServer is false, stop: unsupported legacy layout.
- If the host is Alpine/musl, macOS, 32-bit Windows/Linux, armv7, or another architecture, stop: unsupported.
- If Python urllib reports TLS EOF/reset while an equivalent curl request succeeds, treat it as a client TLS-stack compatibility issue. Ensure the current installer selects curl; do not change proxy protocol based on that error alone.
- If the embedded Node.js fails, report the exact process error; do not alter system libraries or Windows runtime components automatically.
- If Remote-SSH requests a different commit after a local VS Code update, rerun the installer with the new commit. Do not delete older commits unless the user explicitly requests cleanup.
- Do not rewrite the installer into multiple interchangeable backends or expose internal retry, path, quality, layout, archive, or architecture parameters.
Evidence to collect on failure
Linux:
uname -s
uname -m
python3 --version
env | grep -iE '^(https?_proxy)=' | sed -E 's#(://[^:/]+:)[^@]+@#\1***@#'
ls -la ~/.vscode-server/cli/servers/Stable-<commit>/
~/.vscode-server/cli/servers/Stable-<commit>/server/node --version
Windows PowerShell:
[System.Environment]::OSVersion.VersionString
$env:PROCESSOR_ARCHITECTURE
py -3 --version
Get-ChildItem Env:HTTP_PROXY,Env:HTTPS_PROXY -ErrorAction SilentlyContinue |
ForEach-Object { $_.Name + '=<' + ($(if ($_.Value) { 'set' } else { 'empty' })) + '>' }
$server = "$HOME\.vscode-server\cli\servers\Stable-<commit>\server"
Get-ChildItem "$HOME\.vscode-server\cli\servers\Stable-<commit>" -Force
& "$server\node.exe" --version
Also capture the relevant section of the VS Code Remote - SSH output containing the requested commit, quality, detected remote platform, and the first download/start failure. Avoid collecting unrelated secrets or full environment dumps.