Reputation: 125
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.
Upvotes: 10
Views: 7664
Reputation: 21
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
Upvotes: 2
Reputation: 1345
After hours of research I came with a more secure and efficient solution:
Open Control Panel, then Internet Options, go to the Content tab and click Certificates.
Go to the Trusted Root Certificate Authorities tab, select the Kaspersky root certificate and click Export.
Follow the instructions. Use the default settings during the certificate export. Enter the name kaspersky.cer for the file.
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
Copy the created .crt file to /usr/local/share/ca-certificates/
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.
Upvotes: 5
Reputation: 21
solved this by adding the update.code.visualstudio.com domain to the trusted list in kaspersky:
Upvotes: 1
Reputation: 197
I solved this error:
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:/$
Upvotes: 16