最近push代码到github的时候出现了问题$ git push origin masterssh: connect to host github.com port 22: Operation timed outfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.经过google后找到了解决办法先用如下命令进行测试ssh -T -p 443 git@ssh.github.com如果测试后出现下面类似的提示说明可以继续操作了Hi userName! You've successfully authenticated, but GitHub does not provide shell access.接下来编辑~/.ssh/config文件(没有则创建一个),然后加入下面的代码:Host github.com
Hostname ssh.github.com
Port 443最后在进行测试下ssh -T git@github.com如果有如下提示表示可以进行正常操作了Warning: Permanently added the RSA host key for IP address '[192.30.253.122]:443' to the list of known hosts.
Hi yourname! You've successfully authenticated, but GitHub does not provide shell access.