我只是想通过 ssh 连接到 github,简直要疯了。
我用的是Windows 7。
老实说,穆加特罗伊德我一整天都在谷歌和论坛上浏览这件事,但没有突破。
在我最近的尝试中,我将配置文件放在 C:\Users\myname.ssh 中。结果离幸福有点近了,但仍然不存在。
我的配置只是说:
Host github.com
IdentityFile ~/.ssh/id_rsa
命令ssh -vT [email protected] /cdn-cgi/l/email-protection
产生:
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/myname/.ssh/config
debug1: Applying options for github.com
debug1: Connecting to github.com [192.30.252.130] port 22.
debug1: Connection established.
debug1: identity file /c/Users/myname/.ssh/id_rsa type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1+github5
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1+github5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /c/Users/myname/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /c/Users/myname/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
输出的顶部看起来像是我的密钥已被找到并使用,而底部则不然。
我很困惑。
任何建议将不胜感激。
谢谢阅读。
正如我在“推送到现有项目时出现 SSH 错误 权限被拒绝(公钥) https://stackoverflow.com/a/20596571/6309“, 再检查一遍:
请注意,如果您使用默认名称,则不需要配置文件id_rsa
and id_rsa.pub
您的私钥和公钥。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)