一些事实:推送到github时,为什么我总是要求输入我的ssh密码?
- 我在Windows 10
- 我使用电源外壳采用PoshGit(我不希望使用的cygwin的bash shell或其任何衍生物)
- 我的资料库都是
[email protected]
,即它们不使用HTTPS远程数据库 - 当我开始一个新的shell会话,如果尚未运行,SSH代理启动,并提示我要我的密码,然后保持居民以后各届会议
- 我已经证实ssh-agent正在运行他的背景
- 我id_rsa文件存在于保存标识列表(
ssh-add -l
),这是我提示输入连接到GitHub的仓库 - 我也试过github's help page suggestion时输入密码的密钥文件,特别是:
git config --global credential.helper wincred
- 它没有做任何事情。
没有一个教程或建议我已经能够阻止ssh从每次我推/拉/ etc时要求我的密码。
任何帮助,将不胜感激。
编辑
对于背景下,斯科特·哈克的关于如何这个老文章应该工作(但显然不适合我): http://haacked.com/archive/2011/12/19/get-git-for-windows.aspx/
编辑
ssh -vvvT [email protected] 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-----
不知道为什么它的加入这是一种方式,然后在试图读取它时会感到困惑。
编辑
按照意见和接受的答案,我的道路指向包含ssh-agent和一个非常过时的bin文件夹中的ssh-补充一点,我是用(更不用说凯基)。修复这个问题,生成一个新的密钥,并将PATH指向正确的,更新的git bin文件夹已经解决了这个问题。
它是要求你的Windows密码或Github密码? – TheGeorgeous
'为密钥'/ c/Users/******* /。ssh/id_rsa'输入密码短语:' –
@TheGeorgeous既不。我通过ssh使用私钥认证,这是标准/推荐的方式来做事情。 –