git问题ERROR: Repository not found.的解决办法

git有时候会报这样的问题

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

解决方案是

git remote set-url命令修改remote URL

git remote set-url传递两个参数

  • remote name。例如,origin或者upstream
  • new remote url。例如,[email protected]:USERNAME/OTHERREPOSITORY.git
git remote set-url origin [email protected]:xxxxxx/xxxxxx.git

 

查看是否成功

$ git remote -v

origin    https:YourUserName/YatouTest00123.git (fetch)
origin    https:YourUserName/YatouTest00123.git (push)

 

你可能感兴趣的:(git问题ERROR: Repository not found.的解决办法)