Open JinFish opened 2 months ago
I run a small offline lab, and have had to figure out how to manually set up vscode-remote SSH w/o an internet connection. This all worked well until 1.89, which is how I found this site (and the previous one). I'm going to test out the paths mentioned here to see if I can't get this to work. Thanks so much to everyone for their research. And no thanks to MS for changing things up with little documentation!
Ok, to add more info, with v1.89
and SSH Remote 0.112
, it appears to want a 2nd program, vscode-cli
. This is getting complicated! Note that this is after I already have vscode-server.tar.gz untar'ed, same as all other previous versions.
~/.vscode-server/vscode-cli-${commit_sha}.tar.gz
( and also xxx..tar.gz.done
)~/.vscode-server/code
(a 20MB single binary, not a folder)~/.vscode-server/code-${commit_sha}
vscode-cli
, because it starts up with a bunch of cmdline params, one of which is --on-host
, but the new version seems to be --on-port
. It then crashes. I'm getting closer...It looks like they're trying to unite the various remote options (SSH, Tunnels, etc) with one plugin.
That seems to be the case, so far based on what I've tried it seems to be sufficient to have ~/.vscode-server/cli/servers/Stable-${commit_sha}/server
.
Ill not that this is the same as issue #7.
However, I found that what was written in the script was to extract
vscode-server.tar.gz
under~/.vscode-server/bin/{commit_sha}
and copy its contents to~/.vscode/cli/servers/Stable-${commit_sha}/server
.
Not a copy but a single symbolic link, which servers the same purpose but with less space on disk.
These are what are used when you manually make a tunnel to a container to vscode.dev.
In my VSCode, however, I simply extracted
vscode-server.tar.gz
under~/.vscode/cli/servers/Stable-${commit_sha}/server
and can work.When I connect to my remote host using the
Remote SSH
plugin, I see the following in theRemote SSH
output, which also seems to prove that VSCode is looking for~/.vscode-server/cli/servers/Stable-${commit_sha}/server
instead of~/.vscode/cli/servers/Stable-${commit_sha}/server
or~/.vscode-server/bin/{commit_sha}
:[16:53:46.345] [server] Checking /home/admin123/.vscode-server/cli/servers/Stable- dc96b837cf6bb4af9cd736aa3af08cf8279f7685/log.txt and /home/admin123/.vscode-server/cli/servers/Stable- dc96b837cf6bb4af9cd736aa3af08cf8279f7685/pid.txt for a running server...
So, I made a request to switch
.vscode/cli
in the script to.vscode-server/cli
.
@JinFish Can you please update your PR #13 to add the symlinik ~/.vscode-server/cli/servers/Stable-${commit_sha}/server
, but don't remove the other symlink.
That should resolve that issue for anyone that uses Remote SSH.
I'm think there is at least 1 more path out there that I need to confirm.
Ok, to add more info, with
v1.89
and SSH Remote0.112
, it appears to want a 2nd program,vscode-cli
. This is getting complicated! Note that this is after I already have vscode-server.tar.gz untar'ed, same as all other previous versions.
- It looks for a new file called
~/.vscode-server/vscode-cli-${commit_sha}.tar.gz
( and alsoxxx..tar.gz.done
)- Which unpacks to
~/.vscode-server/code
(a 20MB single binary, not a folder)- It quickly renames the binary to
~/.vscode-server/code-${commit_sha}
- After that it launches the code binary, but I appear to have mis-matched versions of
vscode-cli
, because it starts up with a bunch of cmdline params, one of which is--on-host
, but the new version seems to be--on-port
. It then crashes. I'm getting closer...It looks like they're trying to unite the various remote options (SSH, Tunnels, etc) with one plugin.
While this is a separate issue. It should not be hard to add that for most users. The problem with VS Code CLI is the download links are not consistent like server (so far that I noticed). Hopefully the placement of code binary is not as bad as vscode server.
I put a PR out that that adds a new download script, to eventually replace the current script.
@JinFish It adds a symbolic link to ~/.vscode-server/cli/servers/Stable-${commit_sha}/server
@eslowney You can use this same script to install VS Code CLI (download-vs-code.sh "linux" "x64" --cli
), it will install it to ~/.vscode-server/code
then make a symbolic link to ~/.vscode-server/code-${commit_sha}
.
Please can you try it out and let me know how it goes?
I still need to add documentation for it.
Indeed, .vscode/cli
is useful and should not be deleted. Thank you very much for your reply, which has taught me a lot.
Hi, I looked at
download-vs-code-server.sh
and got a lot out of it! Thank you very much for this script.However, I found that what was written in the script was to extract
vscode-server.tar.gz
under~/.vscode-server/bin/{commit_sha}
and copy its contents to~/.vscode/cli/servers/Stable-${commit_sha}/server
.In my VSCode, however, I simply extracted
vscode-server.tar.gz
under~/.vscode/cli/servers/Stable-${commit_sha}/server
and can work.When I connect to my remote host using the
Remote SSH
plugin, I see the following in theRemote SSH
output, which also seems to prove that VSCode is looking for~/.vscode-server/cli/servers/Stable-${commit_sha}/server
instead of~/.vscode/cli/servers/Stable-${commit_sha}/server
or~/.vscode-server/bin/{commit_sha}
:So, I made a request to switch
.vscode/cli
in the script to.vscode-server/cli
.