问题是我从未看到输入SSH密钥密码的提示,只是提示直接登录我的git服务器。
经过测试的ssh连接:
$ ssh -vT git@myhost.lan
OpenSSH_7.6p1, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to myhost.lan [xx.xx.xx.xx] port 22.
debug1: Connection established.<br>
debug1: identity file /c/Users/username/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/username/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory<br>
debug1: identity file /c/Users/username/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
...
debug1: identity file /c/Users/username/.ssh/id_rsa type "0"
是什么意思?
当目录类型中不存在键为“-1”时,键入的键应为“1”
我的id_rsa密钥位于
c:/Users/username/.ssh/id_rsa
$ ssh-add /c/Users/username/.ssh/id_rsa
密钥对是使用git-bash命令$ ssh-keygen -t rsa -C""