修改本地文件,使用 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
本文介绍了一种常见错误“Repository not found”在尝试将本地更改推送到GitHub时的解决方案。通过修改远程仓库的URL地址,可以成功解决此问题。
850

被折叠的 条评论
为什么被折叠?



