-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use VS Code Remote Development w/o marketplace, update connectivity #15
Comments
@LesterCheng Currently the machine you connect to needs to have outbound connectivity to both update.code.visualstudio.com and marketplace.visualstudio.com. These are used to acquire and update the "VS Code Server" and the extensions installed remotely. So, if I'm understanding correctly, I think the answer to your question is no. |
@Chuxel is there any possibility of getting a packaged version of the "VS Code Server" that could be loaded onto the remote machine manually to avoid creating an outbound connection? |
@LesterCheng not at this time. |
@kieferrm Understood, thanks! Any plans to introduce something like this? Otherwise this issue can be closed. |
@LesterCheng Beyond VS Code server, extensions are also installed on the remote host from the marketplace. We are in preview, so while we don't have specific plans, we are interested in understanding what people need to shape our direction. That said, our of curiosity, what is your use case? Is there anything in particular preventing you from getting out bound access that we should be aware of? |
@Chuxel without getting into specifics, this is an enterprise environment where development is only done on remote machines which need to be ssh'd into. Neither the remote machine nor the local os (where you ssh from) have connectivity to outside connections. I'd be happy to continue this over email you if it would help. I think a similar scenario was mentioned in the blog announcing this release: "Because the code bases are so large, we see engineers at shops like Facebook (and Microsoft!) use editors like vim to work remotely against secure and powerful "developer VMs". |
@LesterCheng Got it - interesting scenario. I changed the title and made it a feature request. Is this due to security requirements? Happy to interact via email - you can find my mail in my GH profile (but I won't paste it due to crawlers.) |
Just tagging on to say that I am also developing in a remote environment where we don't have access to outside internet except for certain mirrored repositories like pypi. |
I would like to add that I'm in the same situation as @underchemist. I will add supplement that with the caveat that my Windows VM can connect to the Internet to download extensions but in order to connect to the corporate network, I need to re-enable the VPN. The Linux server I develop on doesn't and will never have outside access. Everything is done using mirrored repos including PyPi as mentioned already. Basically I need extensions that I install locally to my VM to duplicate over to the server once I connect to it. A prompt that appears once it activates the ssh connection to the server asking if you would like to install and/or update the Linux extensions with a yes/no option to click on would be ideal. A status bar showing the transfer would great to see as well. This would be done through a sftp or scp session. |
I'm on the same situation. At work I have to connect to a remote desktop before SSH to server. The remote desktop isn't allowed to access world wide web so I always have to install extensions from VSIX files. Recently, I've switched from VSCode + SSHFS combo to Code-Server, which runs on browser and offer Intellisense. However, it still messing up with browser's keyboard shortcuts, which is a nightmare. I'd really hope that you guy could build a standalone version soon!! |
I also has the similar problem. step 1: download the vscode-server step 2: copy vscode-server-linux-x64.tar.gz to direction / step 3: modify C:\Users\administrator\.vscode-insiders\extensions\ms-vscode-remote.remote-ssh-0.35.0\out\extension.js replace it with "cp /vscode-server-linux-x64.tar.gz ." then retry connected, it's ok. |
I also in the same situation. |
Same situation. Cannot install the C++ plugin for some reason even though the internet access should work. It recommends using the VSIX, but I cannot install these manually as far as I know. |
You can install an extension manually in the remote context, pls see https://code.visualstudio.com/api/advanced-topics/remote-extensions#installing-a-development-version-of-your-extension |
Hi there. I've downloaded the VSIX file of this extension and unpacked it. I couldn't find any lines in the code that cotains "wget -nv -O vscode-server-linux-x64.tar.gz" as you've suggested. Anyway, this is what I'm getting when trying to install RemoteSSH extension v0.12 on VSCode v1.34.0 offline: |
@Chuxel Instead of download files in the remote server, Is there a possible to use the connection between the local and the remote via ssh to transfer and update the "VS Code Server" and the extensions installed remotely? |
@egamma I don't know if it's specific to the C++ extension, but after installing the VSIX it appears to download a whole bunch of stuff, which is where it's failing and prints this:
I tried both the win32 version (client) and linux (server), and in both cases the VSIX fail to install. |
@cliffburdick |
@LesterCheng I got it working from the following: |
@stamaimer Not currently, but this feature request is tracking interest in exactly that scenario. |
@roblourens Yes, I know I am supposed to use the nightly version of the ssh extension. I initially used the regular one but right after I posted the comment I made an edit (see at the bottom) stating that I switched to the nightly one (uninstalling the regular one first) but the results where the same. Anyway, I updated to today's build and it still doesn't work, but this time I get a different error that suggests that the download from the client actually gets triggered:
Here's the complete log, please notice the build number at the top:
The OpenSSH version on the remote host is Thanks a lot for the work you're putting in this :) |
@roblourens Indeed, my bad. The wget still takes a while to timeout, I had to kill it manually. Here is the command launched on the remote if it can help you: This time it tries try copy from the host, but something else is failing, it's hanging forever, here are the logs:
I have the following file on the remote, if it can help:
The commands ran by the vscode ssh when it was hanging:
|
@roblourens Sure, the version of SSH on the windows box is
If I manually go to the AppData/Local/Temp/... directory and scp the file across with |
@roblourens Currently what you've done is make it so you need the client to have access to the remote host while remaining connected to the Internet. This dependency needs to be removed. By default, the server should be updated every time VSCode updates (thanks for clarification there) on the client side. Then, when the client does have access to the remote host (but does NOT have Internet access), the ssh extension will scp the server over to the remote host. This should also improve the situation for all users as it should be faster to download to client and then scp to remote host regardless if the remote has Internet access or not. |
Thanks for all this work! I'm still having some issues with this on latest insiders and nightly builds.
After a few seconds new terminal pops up very briefly showing that it is transferring the server tar, however it returns to the above terminal waiting for the tar file to appear and hangs. Then if I check on my remote machine I see several tar files (for the several attempts I've made) however their filenames are the full windows path i.e.
For some reason the check to see if the transfer is done is not being recognized, I assume because of the way the filenames are being saved when transferred? The
|
@dreamorosi well I have absolutely no idea what this error means:
At this point, we are just trying to download the server on the client, using node's @jjunac if you run that command in a terminal on the remote, does it ever time out? I am expecting it to timeout within 7 seconds. If it doesn't, I don't know what it's waiting for. After that it seems likely that you are seeing the same issue with getting the wrong name for the target file that @Helloimbob and @underchemist are seeing.
Thanks for the suggestion, will change the extension to try that. @WSLUser Now I understand, thanks. The thing is, we publish a bunch of flavors of the server, and that number will grow, and they are large. We can't download all of the servers preemptively every time vscode updates. If we downloaded them ahead of time it would have to be a user-initiated experience. But I think this is separate from what I am trying to do here, so feel free to open a new issue for it. |
@roblourens I investigated the timeout thing, and on my version of wget (GNU 1.11.4, yeah pretty old) there are 20 tries by default. So the actual waiting time is 140 seconds. I would suggest adding the
Hope it helps 😃 Thank you for the huge amount of effort you are putting in this feature 💯 |
@roblourens Yes, because of company policies I am connected to a VPN and use proxies. I have setup my proxy settings (credentials, host, etc. ) in vscode through the In some cases SSL has proven to be an issue on this setup with many more tools due to some company self signed certificates. Is there any way to download the client without it (maybe some flags like |
@jjunac FWIW, the error message I get when it attempts (and fails since I can't be connected to download server and connect to remote host) shows it only retries once. However my remote host runs Fedora so maybe your remote host has a different default timeout for ssh.
What are those flavors based on? It really should just be rpm based, deb based, bsd/mac, and arm. None of these servers should have a dependency on Worse comes to worse, you simply add a check so you know which server to download if you really want to maintain a ton of servers. That would only take a few seconds to run and ensure you're not just grabbing them all. You could also have an explicit setting that allows the user to tell the extension which server to download. I can file a new issue for this as suggested if it will allow this issue to be fully resolved. |
@jjunac I set connect timeout and dns timeout. If you don't have internet access, that should be enough, right? I don't want to set |
@WSLUser There will be several versions for architecture/OS (including windows, eventually), and the download is about 30MB, so I think it's not ok for us to predownload every version ahead of time. Thinking this goes along with the comments above about offline clients so I opened #1242 for this, feel free to add any comments. |
@roblourens Yes sure it is enough if there is no internet connection, I just wanted to raise that the read timeout is awfully long by default, but if you have a plan for that then it's fine :) However is there a plan to hardcode the number of tries to make sure the behavior is the same for every machine ? As in my company we are running SLES 11 with an old version of GNU Wget (1.11.4) and by default wget tries 20 times:
|
Oh, does it retry for the offline error you get? In my testing, it is not retrying for "Network is unreachable". If you just run |
And I've pushed a fix for the path issue on windows that @Helloimbob and @underchemist are seeing. |
@roblourens I set the timeout to 1s and tried to wget something, and it is indeed trying 20 times:
On the other hand, I just did another test, and the path error is indeed fixed. However, I'm getting a
And here is the stack trace I'm getting in the JS console:
It seems to be linked to the extension server. Am I missing something ? |
I can confirm that I can now connect to remote host by having my vs code client transfer the server code instead of fetching through wget. cheers. |
Progress. @jjunac looks like you are now seeing #103 which means that you might not have a compatible glic version. Some details and tips here: https://code.visualstudio.com/docs/remote/linux#_remote-host-container-wsl-linux-prerequisites |
@roblourens Indeed, the version of glibc on the machine is below the requirements. Thank you for the doc, I will see what I can do. |
Hi there. |
@roblourens thanks so much for adding this! I've been eagerly awaiting it. I'm having trouble with proxy settings on the local side, running on Windows with system proxy settings. I have no problem installing extensions locally, but with
I'm not sure how to debug this further, can you help? |
Is there anyway to get around this limitation "VS Code Server requires outbound HTTPS (port 443) connectivity to update.code.visualstudio.com and marketplace.visualstudio.com"?
To clarify: will this work if the local os and remote machine both have ssh connectivity to each other but no outbound connectivity?
The text was updated successfully, but these errors were encountered: