错误内容:
$ git push 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.
发生的原因:
权限不足,我在此之前已经登入了"account1的Github账号",但是我链接的仓库是"account2"的
$ git remote -v
origin https://github.com/account2/test.git (fetch)
origin https://github.com/account2/test.git (push)
解决方案:
1. 给予account1权限
2. 删除凭据重新登入至account2的Github账号
Windwos
开始菜单搜索 凭据管理器->Windos凭据->普通凭据->删除Github凭据
总结:
我忘记了曾经在这台电脑登陆过Github账号。这是一个愚蠢的问题,我却为此花费了一天的时间