git报错 ssh: Could not resolve hostname https: Name or service not known fatal: Could not read from remote repository.-QUI-Notes

问题描述

git在提交或拉取得时候报错:
ssh: Could not resolve hostname https: Name or service not known
fatal: Could not read from remote repository.

解决步骤

执行命令
1.移除origin地址

git remote rm origin
2.新增origin地址

git remote add origin https://github.com/...你的GitHub项目地址

然后再执行你的命令
git pull/push...
如果需要验证账号,请参考这篇https://course.51qux.com/2876.html