ssh,github,它不起作用

时间:2012-12-08 19:25:45

标签: github ssh

我确定我将我的ssh密钥上传到github,我也给了文件夹和文件正确的权限。但我仍然有这个。 anyidea?

 ➜  python-google  ssh -vT github.com    
    OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
    debug1: Reading configuration data /etc/ssh_config
    debug1: Applying options for *
    debug1: Connecting to github.com [0.0.62.138] port 22.
    debug1: Connection established.
    debug1: identity file /Users/seeker/.ssh/id_rsa type 1
    debug1: identity file /Users/seeker/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/seeker/.ssh/id_dsa type -1
    debug1: identity file /Users/seeker/.ssh/id_dsa-cert type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze1+github8
    debug1: match: OpenSSH_5.5p1 Debian-6+squeeze1+github8 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_5.6
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-md5 none
    debug1: kex: client->server aes128-ctr 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 /Users/seeker/.ssh/known_hosts:1
    Warning: Permanently added the RSA host key for IP address '0.0.62.138' to the list of known hosts.
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    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 RSA public key: /Users/seeker/.ssh/id_rsa
    debug1: Authentications that can continue: publickey
    debug1: Trying private key: /Users/seeker/.ssh/id_dsa
    debug1: No more authentication methods to try.

我确定我将我的ssh密钥上传到github,我也给了文件夹和文件正确的权限。 但我仍然有这个。 anyidea?

3 个答案:

答案 0 :(得分:0)

检查您的ssh公钥是否已被复制为一个行:在GitHub ssh字段中可以很容易地将其复制到多行。

如果只是在GitHub上正确复制和导入公钥,/Users/seeker/.ssh/id_rsa(.pub)将起作用(如果你的ssh目录是properly protected)。


Connecting to github.com [0.0.62.138] port 22.

GitHub page明确提到:

# debug1: Reading configuration data /Users/you/.ssh/config
# debug1: Reading configuration data /etc/ssh_config
# debug1: Applying options for *
# debug1: Connecting to github.com [207.97.227.239] port 22.
  

连接应该是 207.97.227.239 端口 22 ,除非您覆盖通过HTTPS使用SSH的设置。

另外,请确保您在配置文件中使用/声明git用户。 删除~/.ssh/config文件,然后尝试:

 ssh -vT git@github.com

答案 1 :(得分:0)

您尚未指定要对其进行身份验证的用户。在向GitHub进行身份验证时,用户应该始终是git - 而不是您的个人用户名。

尝试ssh -vT git@github.com

答案 2 :(得分:0)

请注意,GitHub不提供shell访问权限。

您需要更新github上的puplic键才能推送。请关注steps

如前所述[{3}}

测试您的密钥/ ssh连接