执行$ git push -u origin main
后报错:
ssh: Could not resolve hostname https: 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.
可通过依次执行以下两个命令解决:
git remote rm origin // 移除origin地址
git remote add origin https://github.com/... //新增origin地址。其中后面地址为你的GitHub项目地址