skip to Main Content

I just wanted to start VS Code on Windows Subsystem Linux but VS Code updates automatically. The issue is a certificate which VS Code wants to access but it is blocked by kaspersky. Kaspersky is installed on Windows 10. I have the Total Securiy Version. Does somebody have a hint? What should I change?

micha@LAPTOP-TD50FJUH:/mnt/c/WINDOWS/system32$ code .
Updating VS Code Server to version 8490d3dde47c57ba65ec40dd192d014fd2113496
Removing previous installation… Installing VS Code Server for x64
(8490d3dde47c57ba65ec40dd192d014fd2113496) Downloading: 100% Failed
–2021-02-05 18:15:16– https://update.code.visualstudio.com/commit:8490d3dde47c57ba65ec40dd192d014fd2113496/server-linux-x64/stable
Resolving update.code.visualstudio.com
(update.code.visualstudio.com)… 51.144.164.215 Connecting to
update.code.visualstudio.com
(update.code.visualstudio.com)|51.144.164.215|:443… connected.
ERROR: cannot verify update.code.visualstudio.com’s certificate,
issued by ‘CN=Kaspersky Anti-Virus Personal Root Certificate,O=AO
Kaspersky Lab’: Self-signed certificate encountered. To connect to
update.code.visualstudio.com insecurely, use `–no-check-certificate’.
ERROR: Failed to download
https://update.code.visualstudio.com/commit:8490d3dde47c57ba65ec40dd192d014fd2113496/server-linux-x64/stable
to
/home/micha/.vscode-server/bin/8490d3dde47c57ba65ec40dd192d014fd2113496-1612545315.tar.gz Please install missing certificates. Debian/Ubuntu: sudo apt-get
install ca-certificates

I have already installed ca-certificates without any Problem.

4

Answers


  1. I solved this error:

    1. (Add Last Line to /etc/wgetrc) – check_certificate = off

    Results:

    everton@LPEw:/$ code
    Updating VS Code Server to version 3c4e3df9e89829dce27b7b5c24508306b151f30d
    Removing previous installation…
    Installing VS Code Server for x64 (3c4e3df9e89829dce27b7b5c24508306b151f30d)
    Downloading: 100%
    Unpacking: 100%
    Unpacked 1719 files and folders to /home/everton/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d.
    everton@LPEw:/$

    Login or Signup to reply.
  2. solved this by adding the update.code.visualstudio.com domain to the trusted list in kaspersky:

    1. open kaspersky
    2. click on the setting button (the gear at the bottom left)
    3. go to the network setting menu item
    4. add the domain to the trusted adresses
    Login or Signup to reply.
  3. After hours of research I came with a more secure and efficient solution:

    1. Open Control Panel, then Internet Options, go to the Content tab and click Certificates.

    2. Go to the Trusted Root Certificate Authorities tab, select the Kaspersky root certificate and click Export.

    3. Follow the instructions. Use the default settings during the certificate export. Enter the name kaspersky.cer for the file.

    4. Move the exported .cer file to a Linux folder, open the folder and run this command:

      openssl x509 -inform DER -in kaspersky.cer -out kaspersky.crt

    5. Copy the created .crt file to /usr/local/share/ca-certificates/

    6. Run sudo update-ca-certificates


    Sources: this solution is a devolopment from Labradorcode’s comment above and was based on a Kaspersky tutorial and this answer.

    Login or Signup to reply.
  4. 1. go to WSL
    then type:
    sudo vi /etc/wgetrc
    uncomment this line 
    #https_proxy = http://proxy.yoyodyne.com:18023/
    type:
    https_proxy = https://update.code.visualstudio.com/commit:8490d3dde47c57ba65ec40dd192d014fd2113496/server-linux-x64/stable:443/
    uncomment 
    use_proxy = on
    type:
    check-certificate=off
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search