git连接远程仓库遇到问题(已解决)

Windows安装git bash
创建好本地仓库
注册好github账号
在github中添加了公钥
连接git remote add origin
在Windows下的git bash中测试链接情况:
$ ssh -T git@github.com
出现错误:
ssh:Could not resolve hostname github.com:Name or service not known.
出错原因未知
【git连接远程仓库遇到问题(已解决)】解决办法:
1,开始尝试ping github.com 发现ping不通
ping 百度也ping不通
2,再次尝试使用站长工具检测dns github.com找到ip并且以管理员身份修改Windows/system32/driver/etc/hosts文件添加ip 和github.com 依然不行
3,找到一个大杀器:cmd中输入 netsh winsock reset 完美解决
4,可以ping百度等网站但是依然不能pinggithub
索性放弃github转而用码云gitee.com可以ping通
5,gitee使用通畅中

    推荐阅读