ssh: Could not resolve hostname github.com: No address associated with hostname
配置github中的ssh keys,验证是否成功,我们可以通过在 Git Bash 中输入 ssh -T git@github.com
# 报错
ssh: Could not resolve hostname github.com: No address associated with hostname
解决办法:
1.ping github.com确定ip地址
ping www.github.com
2.找到windows系统下的hosts文件
路径:C:\Windows\System32\drivers\etc
3.将ping到的ip地址加入hosts文件中
比如:20.205.243.166 github.com
4.如何加入hosts文件中并保存
打开黑窗口以管理员的身份进入,输入notepad,出现下面界面
然后点击文件
选择打开
,找到hosts文件打开就可以进行修改保存