推送到 github 时,为什么总是要求我输入 ssh 密码?

When pushing to github, why am I always asked for my ssh password?

一些事实:

每次我 push/pull/etc.

时,我找不到的任何教程或建议都无法阻止 ssh 询问我的密码

如有任何帮助,我们将不胜感激。

编辑

对于上下文,Scott Haack 关于这应该如何工作的旧文章(虽然显然不适合我): http://haacked.com/archive/2011/12/19/get-git-for-windows.aspx/

编辑

ssh -vvvT git@github.com verify 生成这个(相关片段):

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007                 
debug1: Reading configuration data /etc/ssh/ssh_config    
debug2: ssh_connect: needpriv 0                           
debug1: Connecting to github.com [192.30.252.130] port 22.
debug1: Connection established.                           
debug1: identity file /c/Users/xxxxx/.ssh/identity type -1
debug3: Not a RSA1 key file /c/Users/xxxxx/.ssh/id_rsa.   
debug2: key_type_from_name: unknown key type '-----BEGIN' 
debug3: key_read: missing keytype                         
debug2: key_type_from_name: unknown key type 'Proc-Type:' 
debug3: key_read: missing keytype                         
debug2: key_type_from_name: unknown key type 'DEK-Info:'  

我删除并重新添加了我的密钥文件,系统提示我输入密码:

D:\> ssh-add -D 
All identities removed.
D:\> ssh-add ~/.ssh/id_rsa
Enter passphrase for /c/Users/xxxxx/.ssh/id_rsa:
Identity added: /c/Users/xxxxx/.ssh/id_rsa (/c/Users/xxxxx/.ssh/id_rsa)
D:\> ssh-add -l 
2048 05:d5:8f:f8:e5:41:66:90:4c:a1:03:93:9d:e5:18:10 /c/Users/xxxxx/.ssh/id_rsa (RSA)

私钥文件如下所示(显然删除了私人信息):

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,xxxxxxxxxxxxxxxx

............etc.==
-----END RSA PRIVATE KEY-----

不知道为什么它以一种方式添加它,然后在尝试读回它时感到困惑。

编辑

根据评论和接受的答案,我的 PATH 指向一个非常过时的 bin 文件夹,其中包含我正在使用的 ssh-agent 和 ssh-add(更不用说注册机了)。解决这个问题,生成一个新密钥,并将 PATH 指向正​​确的、更新的 git bin 文件夹已经解决了这个问题。

一些指南指出了 openssh 的真正旧版本(是的,当前版本是 7.1p1):

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007

而且密钥看起来也很古老(我希望没有人再在生产中使用 DES):

DEK-Info: DES-EDE3-CBC,xxxxxxxxxxxxxxxx

确保您的 PATH 中有更新的内容。