近日在进行push的时候出现以下错误:
$ git push
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决思路:
参考资料:
Host github.com
Hostname ssh.github.com
Port 443
然后保存,Git中输入一下密令:
ssh -T git@github.com
使用ssh -T git@github.com来测试和GitHub的网络通信是否正常,如果提示Hi xxxxx! You’ve successfully authenticated, but GitHub does not provide shell access. 就表示一切正常了。
然后就可以正常上传了。