赞
踩
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",
解决办法:
按下F1,编辑settings.json,指定:
"remote.SSH.configFile": "D:/Program Files/Microsoft VS Code Insiders/vps",
解决办法(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)
- wget http://archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.35.0.orig.tar.gz
- tar -xzvf curl_7.35.0.orig.tar.gz
- cd curl-7.35.0/
- ./configure
- make
- 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. 。。。。这方法不行。。。
连接成功!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。