When you connect to a host it executes a bash script that wgets or curls a tarball and extracts it in a directory in your home directory. Here’s an offline workaround.
-
Attempt to connect, let it fail
-
On server, get the commit id
$ ls ~/.vscode-server/bin 553cfb2c2205db5f15f3ee8395bbd5cf066d357d
-
Download tarball replacing $COMMIT_ID with the the commit number from the previous step
For Stable Version
https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/stable
For Insider Version
https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/insider
-
Move tarball to ~/.vscode-server/bin/$COMMIT_ID/vscode-server-linux-x64.tar.gz
-
Extract tarball in this directory
$ cd ~/.vscode-server/bin/$COMMIT_ID $ tar -xvzf vscode-server-linux-x64.tar.gz --strip-components 1
-
Connect again
You’ll still need to install any extensions manually. There’s a download button next to all the extensions in the marketplace. Once you have the .vsix file you can install them through the GUI with the Install from VSIX option in the extensions manager.
This is kind of a pain and hopefully they improve this process, but if you have a network-based home directory, you only have to do this once.