简体   繁体   English

测试 SSH 连接到 git 提示密码

[英]Testing SSH connection to git prompts password

we have set up a local Git server and enabled the SSH settings on it.我们已经设置了一个本地 Git 服务器并在其上启用了 SSH 设置。 Following the guide here we tested the SSH key but it still prompt us for password.按照此处的指南我们测试了 SSH 密钥,但它仍然提示我们输入密码。 Below is the log from the ssh:以下是来自 ssh 的日志:

debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /c/Users/Eugene/.ssh/id_rsa RSA SHA256:XXX
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /c/Users/Eugene/.ssh/id_dsa
debug3: no such identity: /c/Users/Eugene/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /c/Users/Eugene/.ssh/id_ecdsa
debug3: no such identity: /c/Users/Eugene/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /c/Users/Eugene/.ssh/id_ed25519
debug3: no such identity: /c/Users/Eugene/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /c/Users/Eugene/.ssh/id_xmss
debug3: no such identity: /c/Users/Eugene/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
git@git.test.com's password:

The guide says something wrong with the SSH setup.该指南说 SSH 设置有问题。 I am not able to see where, hope to get some help here.我看不到哪里,希望在这里得到一些帮助。

What's the output from ssh -T git@github.com ? ssh -T git@github.com的输出是什么?

From the debug output, the ssh client cannot locate where your private keys are stored.从调试输出中,ssh 客户端无法找到您的私钥的存储位置。 I'd troubleshoot by checking the following:我会通过检查以下内容来排除故障:

  • Make sure you've added keys with ssh-agent.确保您已使用 ssh-agent 添加了密钥。
  • Double check and see if your configuration file ( ~/.ssh/config ) has the correct path pointing to your identity file.仔细检查并查看您的配置文件 ( ~/.ssh/config ) 是否具有指向您的身份文件的正确路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM