How can I install vscode-server in linux offline

后端 未结 1 1814
心在旅途
心在旅途 2020-12-14 11:38

I am trying to install VScode remote-ssh extensions, but my remote host could not connect to the Internet,so there is no way to download software is needed. So I got some er

相关标签:
1条回答
  • 2020-12-14 12:20
    1. First get commit id
    2. Download vscode server from url: https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
    3. Upload the vscode-server-linux-x64.tar.gz to server
    4. Unzip the downloaded vscode-server-linux-x64.tar.gz to ~/.vscode-server/bin/${commit_id} without vscode-server-linux-x64 dir
    5. Create 0 file under ~/.vscode-server/bin/${commit_id}
    commit_id=f06011ac164ae4dc8e753a3fe7f9549844d15e35
    
    # Download url is: https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
    curl -sSL "https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable" -o vscode-server-linux-x64.tar.gz
    
    mkdir -p ~/.vscode-server/bin/${commit_id}
    # assume that you upload vscode-server-linux-x64.tar.gz to /tmp dir
    tar zxvf /tmp/vscode-server-linux-x64.tar.gz -C ~/.vscode-server/bin/${commit_id} --strip 1
    touch ~/.vscode-server/bin/${commit_id}/0
    

    [edited to add helpful comment in case comments disappear later:]

    You can replace commit:<commit> with latest to get the latest release build. Example: https://update.code.visualstudio.com/latest/server-linux-x64/stable. Respects indicated quality i.e, stable, insider. – Doom5

    0 讨论(0)
提交回复
热议问题