Automation to download Extensions for VS Code on a code server without an internet connection?

127 views Asked by At

I'm really tried everything. I want to download extensions to a code server. But I'm running into a problem because I want it to run on a no internet container, meaning I can't run: code-server --install-extension KevinRose.vsc-python-indent

And I have to run : code-server --install-extension ./KevinRose.vsc-python-indent-latest.vsix.

Now I ran into a different problem because I want to download the extensions into a directory with the .vsix suffix and I have tried several ways.

wget -nv -w 10 --random-wait --continue https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/latest/vspackage

How ever I get 80% of the time error 429 or error 500 and it is really inconsistent.

I tried to do it differently with curl:

curl -o ./Microsoft.VisualStudio.Services.VSIXPackage https://ms-python.gallery.vsassets.io/_apis/public/gallery/publisher/ms-python/extension/python/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

How ever it takes really really long time and it gets stuck.

or I even tried:

wget -nv https://ms-python.gallery.vsassets.io/_apis/public/gallery/publisher/ms-python/extension/python/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

How ever this is also gets stuck with: Cookie coming from ms-python.gallery.vsassets.io attempted to set domain to visualstudio.com

I'm really lost, is there a way to make it with a bash script ?

And I have to run : code-server --install-extension ./KevinRose.vsc-python-indent-latest.vsix.

Now I ran into a different problem because I want to download the extensions into a directory with the .vsix suffix and I have tried several ways.

wget -nv -w 10 --random-wait --continue https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/latest/vspackage

How ever I get 80% of the time error 429 or error 500 and it is really inconsistent.

I tried to do it differently with curl:

curl -o ./Microsoft.VisualStudio.Services.VSIXPackage https://ms-python.gallery.vsassets.io/_apis/public/gallery/publisher/ms-python/extension/python/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

How ever it takes really really long time and it gets stuck.

or I even tried:

wget -nv https://ms-python.gallery.vsassets.io/_apis/public/gallery/publisher/ms-python/extension/python/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

How ever this is also gets stuck with: Cookie coming from ms-python.gallery.vsassets.io attempted to set domain to visualstudio.com

I'm really lost, is there a way to make it with a bash script ?

0

There are 0 answers