在windows 7机器上设置github ssh
我刚刚在windows机器上使用git's how to guide安装了git,但我遇到了问题。在windows 7机器上设置github ssh
当我运行ssh -T [email protected]
一步我收到此错误:
ssh_exchange_identification: read: Connection reset by peer
这里是一个较长的痕迹,我得到了通过运行ssh -vvv [email protected]
:
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug2: ssh_connect: needpriv 0 debug1: Connecting to github.com [207.97.227.239] port 22. debug1: Connection established. debug1: identity file /c/Users/bmehanni/.ssh/identity type -1 debug3: Not a RSA1 key file /c/Users/bmehanni/.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:' debug3: key_read: missing keytype debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug2: key_type_from_name: unknown key type '-----END' debug3: key_read: missing keytype debug1: identity file /c/Users/bmehanni/.ssh/id_rsa type 1 debug1: identity file /c/Users/bmehanni/.ssh/id_dsa type -1 ssh_exchange_identification: read: Connection reset by peer
感谢
我有同样的问题,但从来没有找到解决办法。
解决方法是使用https而不是ssh。
它看起来像有你的ssh密钥有问题,所以我猜你在运行ssh-keygen时出了点问题。尝试重新运行该步骤
是的,请再试一次。你是否支持代理? – Haacked
我不相信我是代理人。我试图重新生成id_rsa.pub,但我又一次得到相同的错误。我没有配置文件或known_hosts文件,我需要它们吗? –
好像你id_rsa钥匙的类型是错误的
debug2: key_type_from_name: unknown key type
SSH试图推断密钥文件名的类型。生成密钥时,需要用-t rsa
标志指定类型。
ssh-keygen -t rsa
而且,接受默认值,你的私钥id_rsa
和文件名您的公钥id_rsa.pub
,否则你将需要在~/.ssh/config
文件中添加配置github上指定的私有密钥使用该特定主办。
Host github.com
HostName github.com
User git
IdentityFile C:/Users/youruser/.ssh/someotherkeyname
这就是我一直在尝试,因为这是什么github指定在他们的指导,但无济于事,现在我只是切换到https而不是ssh。 –
也不适用于我(Win 7) –
@ManuelM。你可以尝试使用'ssh-add/path/to/key'将身份验证代理添加到身份验证代理中 – mbenegas
这应该可能在serverfault而不是SO上。 – Bot