问题描述
我在github上已经设置好了ssh key:
但是通过ssh克隆github上的库时,出现报错:
我还缺少什么配置吗?
补充:
ssh -vvv -T git@github.com
补充:
文件是已生成的
问题解答
回答1:你缺少科学上网的配置?ssh -vvv -T git@github.com 看看。
git 没有账号的概念。
你这是不同的 ssh key,同一个 GitHub 账号。
所有 GitHub 用户都共享一个名叫 git 的 ssh 账号。
根据 ssh 调试信息,考虑防火墙(或者类似的网络限制)的问题。检查 Windows 防火墙设置、网络设置(你的网络是不是不允许访问 22 端口什么的?有没有透明代理?)、最后检查中国特色的部分。
回答2:首先上图
➜ .ssh ssh -vvv -T git@github.com
OpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016debug1: Reading configuration data /etc/ssh/ssh_configdebug2: resolving 'github.com' port 22debug2: ssh_connect_direct: needpriv 0debug1: Connecting to github.com [192.30.253.112] port 22.debug1: Connection established.debug1: identity file /home/mugbya/.ssh/id_rsa type 1debug1: key_load_public: No such file or directorydebug1: identity file /home/mugbya/.ssh/id_rsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/mugbya/.ssh/id_dsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/mugbya/.ssh/id_dsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/mugbya/.ssh/id_ecdsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/mugbya/.ssh/id_ecdsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/mugbya/.ssh/id_ed25519 type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/mugbya/.ssh/id_ed25519-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.3debug1: Remote protocol version 2.0, remote software version libssh-0.7.0debug1: no match: libssh-0.7.0debug2: fd 3 setting O_NONBLOCKdebug1: Authenticating to github.com:22 as ’git’
试了一下不太是ssh证书的问题,你继续排查吧