jeanp413 / open-remote-ssh

VSCode Remote Development: Open any folder on a remote machine using SSH.
MIT License
279 stars 38 forks source link

Wrong URL for vscodium download #163

Open ivan-balashov opened 1 month ago

ivan-balashov commented 1 month ago

While trying to connect to server there is an error "Couldn't install vscode server on remote server, install script returned non-zero exit status";

In the console there is a strange server install command with extra dots and also this link is not exist on github vscodium " [Trace - 08:30:39.135] Server install command stdout: Error downloading server from https://github.com/VSCodium/vscodium/releases/download/1.91.0./vscodium-reh-linux-x64-1.91.0..tar.gz " while correct link is h ttps://github.com/VSCodium/vscodium/releases/download/1.91.0.24190/vscodium-reh-linux-x64-1.91.0.24190.tar.gz

Looks like problem is here

SERVER_DOWNLOAD_URL="$(echo "https://github.com/VSCodium/vscodium/releases/download/\${version}.\${release}/vscodium-reh-\${os}-\${arch}-\${version}.\${release}.tar.gz" | sed "s/\${quality}/$DISTRO_QUALITY/g" | sed "s/\${version}/$DISTRO_VERSION/g" | sed "s/\${commit}/$DISTRO_COMMIT/g" | sed "s/\${os}/$PLATFORM/g" | sed "s/\${arch}/$SERVER_ARCH/g" | sed "s/\${release}/$DISTRO_VSCODIUM_RELEASE/g")"

OliverinMelb commented 1 month ago

same here

OliverinMelb commented 1 month ago

"remote.SSH.serverDownloadUrlTemplate": { "type": "string", "description": "The URL from where the vscode server will be downloaded. You can use the following variables and they will be replaced dynamically:\n- ${quality}: vscode server quality, e.g. stable or insiders\n- ${version}: vscode server version, e.g. 1.69.0\n- ${commit}: vscode server release commit\n- ${arch}: vscode server arch, e.g. x64, armhf, arm64\n- ${release}: release number, vscodium only https://github.com/VSCodium/vscodium/pull/1192", "scope": "application", "default": "https://github.com/VSCodium/vscodium/releases/download/${version}.${release}/vscodium-reh-${os}-${arch}-${version}.${release}.tar.gz" }, you could try hard coding this default url to force download correct version in your source code package .json file. I hope this one works for yo : )

Seneral commented 3 weeks ago

Yes, DISTRO_VSCODIUM_RELEASE is not set. Additionally, for me, the SERVER_APP_NAME="code-server-oss" is wrong, when I check the bin directory of the file I then manually downloaded and extracted (to skip the download and extract step), it contains only "codium-server helpers/ remote-cli/" I suspect the @jeanp413 tested this on codium and this is a separate script intended for code-oss that has some weird mix with vscodium? Maybe it wasn't tested on code-oss

Seneral commented 3 weeks ago

Was able to fix that by setting the experimental Server Binary Name setting to codium-server. I assume the oss one was inferred from me using OSS, but why would it do that when the URL it uses is still markedly vscodium? That just means it's broken by default. Either way, definitely needs clear documentation in the readme!

I'm not done anyway, it attempts to unlock an OpenSSH key of mine which it has absolutely NO reason to unlock, and then fails like this:

[Trace - 13:55:13.919] Creating forwarding server 38843(local) => 37953(socks) => 35171(remote) [Info - 13:55:15.217] Resolving ssh remote authority 'ssh-remote+tc@192.168.0.7' (attemp #3) [Error - 13:55:15.223] Couldn't get identities from OpenSSH agent Error: SSH_AUTH_SOCK environment variable not defined at t.gatherIdentityFiles (/home/xxx/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.46-universal/out/extension.js:1:443319) at async /home/xxx/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.46-universal/out/extension.js:1:403197 [Trace - 13:55:15.223] Identity keys: /home/xxx/.ssh/key [Info - 13:55:15.480] Trying no-auth authentication [Info - 13:55:15.525] Trying publickey authentication: /home/xxx/.ssh/key SHA256:sha [Error - 13:56:15.225] Error resolving authority Error: Timed out while waiting for handshake at Timeout. (/home/xxx/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.46-universal/out/extension.js:1:159592) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) [Info - 13:56:15.229] Resolving ssh remote authority 'ssh-remote+tc@192.168.0.7' (attemp #4)

Any idea why that could be? I don't need any identity to connect to the target

ggtony233 commented 3 days ago

Same question, I was using code-oss and noticed that there is a setting in this extension called Remote.SSH: Server Download Url Template, which seems to be the default for anyone using this extension to be using the codium editor. Does it not support code-oss? This is the option I see in this plugin when using code-oss

"remote.SSH.serverDownloadUrlTemplate": "https://github.com/VSCodium/vscodium/releases/download/${version}.${release}/vscodium-reh-${os}-${arch}-${version}.${release}.tar.gz"
OliverinMelb commented 3 days ago

Same question, I was using code-oss and noticed that there is a setting in this extension called Remote.SSH: Server Download Url Template, which seems to be the default for anyone using this extension to be using the codium editor. Does it not support code-oss? This is the option I see in this plugin when using code-oss

"remote.SSH.serverDownloadUrlTemplate": "https://github.com/VSCodium/vscodium/releases/download/${version}.${release}/vscodium-reh-${os}-${arch}-${version}.${release}.tar.gz"

Same question, I was using code-oss and noticed that there is a setting in this extension called Remote.SSH: Server Download Url Template, which seems to be the default for anyone using this extension to be using the codium editor. Does it not support code-oss? This is the option I see in this plugin when using code-oss

"remote.SSH.serverDownloadUrlTemplate": "https://github.com/VSCodium/vscodium/releases/download/${version}.${release}/vscodium-reh-${os}-${arch}-${version}.${release}.tar.gz"

Yes, you can either find the setting in VSCode under the extension's settings or modify the URL in the plugin's source code. Here's what you can do:

In VSCodium or Code-OSS, navigate to the extension settings and locate the Remote.SSH: Server Download Url Template. From there, you can change the URL to the one you prefer.

Alternatively, you can modify the source code directly. Go to the package.json file in the extension's source code and update the "remote.SSH.serverDownloadUrlTemplate" field. Then, package the extension into a .vsix file and reinstall it. This way, you'll be able to use your desired download URL template. image

image

ggtony233 commented 3 days ago

This is the default option to get the link: https://github.com/VSCodium/vscodium/releases/download/1.93.0./vscodium-reh-linux-x64-1.93.0..tar.gz It seems that the correct release link has a string of numbers after 1.93.0, what is the significance of this string of numbers? I've looked at each revision number and there seems to be a different 5-digit number at the end of the release link, is it possible to add a snippet to the code that gets this 5-digit number after the revision number? @jeanp413