7

I want to use remote development on VS Code, but it has the following error:

SSH Resolver called for "ssh-remote+kf"
SSH Resolver called for host: kf
Setting up SSH remote "kf"
Using commit id "daf71423252a707b8e396e8afa8102b717f8213b" and quality "insider" for server
Install and start server if needed
> bash: no job control in this shell
> Installing...
> Downloading with wget
> ERROR: certificate common name “*.azurewebsites.net” doesn’t match requested host name “update.code.visualstudio.com”. To connect to update.code.visualstudio.com insecurely, use ‘--no-check-certificate’.
> 1931c79d-3297-4f42-9eb5-6f8f91556ed9##25##
"install" terminal command done
Received install output: 1931c79d-3297-4f42-9eb5-6f8f91556ed9##25##
Server download failed
Downloading VS Code Server failed. Please try again later.

How I can use no-check-certificate to wget VS Code server?

Giacomo1968
  • 58,727

5 Answers5

14

If you are behind a proxy, create a file named .wgetrc in your home directory and add the following lines:

use_proxy=on
http_proxy=http://<my-proxy.company.net:port>
https_proxy=http://<my-proxy.company.net:port>

If needed, for one time, add:

check-certificate=off

Note: Disabling certificate check is not recommended as it can be a security threat.

Giacomo1968
  • 58,727
7

Add a line of :

check-certificate=off

to your .wgetrc file under the user's home directory.

Note: It will disable the SSL certificate check for all wget commands you use, unless you change it to:

check-certificate=on
Giacomo1968
  • 58,727
Yingbo
  • 71
3

Configuring WSL behind proxy:

I will provide my solution that works for me.
In WSL subsystem add file in /etc/apt/apt.conf with proxy setting:

Acquire::http::Proxy "http://user:password@server_addr:port";
Acquire::https::Proxy "http://user:password@server_addr:port";

After that, add another setting in ~/.wgetrc file:

use_proxy = on
check_certificate = off
http_proxy = http://user:password@server_addr:port
https_proxy = http://user:password@server_addr:port
ftp_proxy = http://user:password@server_addr:port

After that, try to install the Visual Studio Code plugin for remote wsl.

Giacomo1968
  • 58,727
Saurabh
  • 31
1

I came across the same problem this morning. And I found some tricks to work around this issue.

I got another machine with Linux, and it could connect to the Internet correctly. I connected to the Linux machine via remote-ssh connect successfully. I checked the home folder, and I found a folder with name .vscode-remote. And I copyed this folder to the home path of the machine I had this problem, and it worked.

Giacomo1968
  • 58,727
0

On my case, I was NOT using a proxy and running on a Windows 10 desktop. I just disabled my anti-virus.

Kaspersky was blocking the downloads.

Giacomo1968
  • 58,727