当前位置:   article > 正文

VS Code insiders 连接远程服务器的坑(杂记)_can't open user config file 1: no such file or dir

can't open user config file 1: no such file or directory > ]0;c:\windows\sy

ssh installation not found

VS Code remote development tool error - An SSH installation couldn't be found
https://frederick-s.github.io/2019/08/08/ssh-installation-couldnot-be-found-error-when-running-remote-ssh-in-vscode/

解决办法:

VS Code will look for the ssh command in the PATH. Failing that, on Windows it will attempt to find ssh.exe in the default Git for Windows install path. You can also specifically tell VS Code where to find the SSH client by adding the remote.SSH.path property to settings.json

按下F1,编辑settings.json,指定:
"remote.SSH.path": "D:/Program Files/Git/usr/bin/ssh.exe",

Can't open user config file vps: No such file or directory
> 过程试图写入的管道不存在。
Install terminal quit with output: 过程试图写入的管道不存在。
Received install output: 过程试图写入的管道不存在。

解决办法:

按下F1,编辑settings.json,指定:
"remote.SSH.configFile": "D:/Program Files/Microsoft VS Code Insiders/vps",

wget download failed
> ERROR: cannot verify update.code.visualstudio.com's certificate, issued by ‘CN=Microsoft Azure TLS Issuing CA 05,O=Microsoft Corporation,C=US’: Unable to locally verify
>  the issuer's authority. To connect to update.code.visualstudio.com insecurely, use `--no-check-certificate'.

解决办法(HTTPS协议无法在Linux上运行的部分):

用Git bash连接到服务器,然后手动下载,
ubuntu@VM-0-13-ubuntu:~/tmp$ curl -sSL “https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable” -o vscode-server-linux-x64.tar.gz
curl: (1) Protocol "“https" not supported or disabled in libcurl
ubuntu@VM-0-13-ubuntu:~/tmp$
怎么解决呢?

对应解决方法是重新安装curl  可参考:(https://www.cnblogs.com/zhishuai/p/8094855.html

  1. wget http://archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.35.0.orig.tar.gz
  2. tar -xzvf curl_7.35.0.orig.tar.gz
  3. cd curl-7.35.0/
  4. ./configure
  5. make
  6. sudo make install

装好后,curl -V能看到,能支持https。

但是还是不行?那就是格式问题了,

原命令:

curl -sSL “https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable” -o vscode-server-linux-x64.tar.gz

正确命令:注意双引号

curl -sSL "https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable" -o vscode-server-linux-x64.tar.gz

ok了!

但是,vscode下面还是无法连接远程Linux,如下

解决办法(证书问题update.code.visualstudio.com's certificate):

[12:50:56.796] > wget download failed
> ERROR: cannot verify update.code.visualstudio.com's certificate, issued by ‘CN=Microsoft Azure TLS Issuing CA 05,O=Microsoft Corpora
> tion,C=US’: Unable to locally verify the issuer's authority. To connect to update.code.visualstudio.com insecurely, use `--no-check-
> certificate'.

正确步骤:

1.手动Bash通过ssh连接到Linux

2. sudo vi /etc/wgetrc

3. 最后一行加上check_certificate = off

4. 重新再试下

参考自 https://stackoverflow.com/questions/66067901/update-vs-code-and-kaspersky-certificate

以下这两个方法试了都不行

---- 无效idea 1----

1)VScode中按F1,输入settings.json

2)添加一行用来忽略HTTPS:  "http.proxyStrictSSL": false

---- 无效idea 2----

1.手动安装最新的vs-code-server,先在Linux上弄个sh脚本download-vs-code-server.sh,内容参考:https://gist.github.com/b01/0a16b6645ab7921b0910603dfb85e4fb#file-download-vs-code-server-sh

2.chmod +x download-vs-code-server.sh

3.运行这脚本 ./download-vs-code-server.sh

4. 。。。。这方法不行。。。

连接成功!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/65665
推荐阅读
相关标签
  

闽ICP备14008679号