修改本地文件,使用 Git 命令行更新到 GitHub 上报错
在 Git 命令中,输入:
git push -u origin master
报错提示:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
分析:
原因不可知,我们直接修改远程仓库的 URL 地址
解决思路及方案:
git remote set-url origin git@github.com:username/test.git
username 是你 GitHub 的用户名
test 是你所要提交到 GitHub 上的仓库名
然后,push 到主干,就大功告成了
git push origin master