本文介绍了ssh:无法解析主机名github.com:名称或服务未知;致命的:远端意外挂断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
设置GitHub帐户的过程很好,但当我尝试将我的存储库推送到GitHub时,它不起作用。它显示的错误信息如下:
The process of setting up a GitHub account works just fine but it doesn't work when I try pushing my repository to GitHub. The error message it shows is as follows:
ssh: Could not resolve hostname github.com: Name or service not known
fatal: The remote end hung up unexpectedly
我试过改变RSA密钥,但仍然得到错误。
I have tried changing RSA keys and all but still getting error.
导致此错误的原因是什么?
What causes this error?
推荐答案
也看到了这个问题。以下是我的解决方案:
Recently, I have seen this problem too. the below is my solution:
- ping github.com,如果ping失败。这是DNS错误。
- sudo vim /etc/resolv.conf,添加:
nameserver 8.8.8.8
nameserver 8.8.4.4
或者它可能是一个真正的网络问题。使用 sudo service network-manager restart
重新启动您的网络管理器或修复它
Or it can be a genuine network issue. Restart your network-manager using sudo service network-manager restart
or fix it up
这篇关于ssh:无法解析主机名github.com:名称或服务未知;致命的:远端意外挂断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!