Could not resolve hostname github: Name or service

Git pull error

ssh: Could not resolve hostname github: 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.

如果遇到上面面这个错误,千万不要用网上的哪个一大堆点击量的:
ping githun.com
这个纯属误导观众,Github的IP 时刻都在变化。
在这里插入图片描述

下面这个方法亲测可用:

git remote set-url origin git@github.com:xuwen0719/Embed_BMS.git
%git@github 是自己的SSH。

下面是成功界面:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/q1038722394/article/details/108523637