github网络错误处理

github网络错误处理

[root@node10 kodoe]# git pull origin:dev
ssh: Could not resolve hostname origin: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
  1. 测试和github的连通性

    返回当前ssh-key在github上对应的用户

    ssh -T git@github.com
    Hi PoplarYang! You've successfully authenticated, but GitHub does not provide shell access.
    
  2. 如果1返回的是Connection timed out

    ssh -T git@github.com
    ssh: connect to host github.com port 22: Connection timed out
    

    有可能DNS被污染,需要找到正确的解析。

    13.250.177.223  github.com
    
原文地址:https://www.cnblogs.com/hiyang/p/13298299.html