[英]Clone git repo not working in vscode although git command succeeds (SSH)
Trying to clone a git repository in Windows vscode from a private Linux host (SSH / client RSA key)尝试从私有 Linux 主机(SSH / 客户端 RSA 密钥)克隆 Windows vscode 中的 git 存储库
What is OK:什么是好的:
git clone ssh://gituser@...
(passphrase request)git clone ssh://gituser@...
(密码请求) The problem:问题:
host sshd log:主机 sshd 日志:
...
debug1: userauth-request for user gituser service ssh-connection method publickey [preauth]
debug1: attempt 1 failures 0 [preauth]
debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:DlTkOFDZK... [preauth]
debug1: temporarily_use_uid: 1033/100 (e=0/0)
debug1: trying public key file /var/services/homes/gituser/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /var/services/homes/gituser/.ssh/authorized_keys, line 1 RSA SHA256:DlTkOFDZK...
debug1: restore_uid: 0/0
Postponed publickey for gituser from 192.168.1.132 port 5xxx1 ssh2 [preauth]
debug1: userauth-request for user gituser service ssh-connection method password [preauth]
debug1: attempt 2 failures 0 [preauth]
debug1: PAM: password authentication failed for gituser: Permission denied
Failed none for gituser from 192.168.1.132 port 5xxx1 ssh2: RSA SHA256:DlTkOFDZK...
debug1: userauth-request for user gituser service ssh-connection method password [preauth]
debug1: attempt 3 failures 1 [preauth]
debug1: PAM: password authentication failed for gituser: Permission denied
Failed password for gituser from 192.168.1.132 port 5xxx1 ssh2
debug1: Unable to open the btmp file /var/log/btmp: No such file or directory
...
From the CMD where the clone does work, type从克隆工作的 CMD 中,键入
set "GIT_SSH_COMMAND=ssh -Tv"
"%LOCALAPPDATA%\Programs\Microsoft VS Code\bin\code.cmd"
From there, try and clone again, this time checking what SSH key is actually used in that new VSCode session.从那里,再次尝试克隆,这次检查新的 VSCode 会话中实际使用的 SSH 密钥。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.