配置了sshkey之后依然无法下载代码:
$ git clone git@github.com:xiangyuecn/Recorder.git Cloning into 'Recorder'... kex_exchange_identification: Connection closed by remote host Connection closed by 192.30.253.112 port 22 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
尝试了网上找到的各种解决方案之后,才发现是在hosts里配置了github.com指向192.30.253.112,导致22端口无响应,连接超时报错。
所以很有可能实际上ssl连接并不是指向这个ip,却一直在试图连接192.30.253.112,把这个去掉,git就能正常使用了。