5

I want to use remote development on VS code, but it has the follow 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.

and how I can use "no-check-certificate" to wget VS Code Server?

Leo Wang
  • 51
  • 1
  • 1
  • 2

5 Answers5

11

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.

Dibakar Aditya
  • 211
  • 2
  • 5
  • 2
    I have been facing this issue and only check-certificate=off line worked for me. Thanks! – Adil Apr 04 '20 at 18:36
6

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

Nikhil_CV
  • 536
  • 3
  • 15
Yingbo
  • 61
  • 1
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.
It should work.

zx485
  • 2,170
  • 11
  • 17
  • 24
Saurabh
  • 31
  • 1
1

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

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 got this problem, and it worked.

Chinglin
  • 11
  • 2
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. Regards.