大家在执行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报错ERROR: Repository not found.的解决办法_第1张图片

解决方案是

执行git remote set-url命令来修改remote URL

git remote set-url传递两个参数$1和$2

$1即remote name;例如,origin或者upstream
$2即new remote url。例如,[email protected]:cursrs366/git_test.git

git remote set-url $1 $2
git remote set-url origin [email protected]:courser366/git_test.git

执行git remote -v查看是否成功
git报错ERROR: Repository not found.的解决办法
或者执行具体命令查看
git报错ERROR: Repository not found.的解决办法_第2张图片