git push 时报错 remote: The project you were looking for could not be found.

原先的库被停用了之后, 只能将远程服务器上的项目代码上传到新的git地址上, 

步骤.

1.  删除并添加新的远程仓库地址 或者修改远程仓库地址, 

git remote rename origin old-origin
git remote add origin https://xxxxxxx.com/123/123.git
git remote set-url origin http://xx.xx.xx.xx/project/123.git

2.  push代码到远程

git push -u origin --all

然后在 第二步的时候报错了, 查了下之后说是与账户有关,此时觉得要不是就是权限不够,要么就是本地账户在使用上有问题

搜索了下找到了一个解决方法, 就是在新的路径上加上用户名, 这样第一次上传就会要求用新的账户,

git remote set-url origin https://用户名@xx.xx.xx.xx/project/123.git
git push -u origin master

参考博客

https://www.seasidecrab.com/cq/387.html   (主要参考这篇的解决方法)

 

https://www.cnblogs.com/wangcp-2014/p/13224794.html

https://www.pianshen.com/article/8754781520/

https://blog.csdn.net/qq827245563/article/details/82970372

原文地址:https://www.cnblogs.com/http-500/p/14867344.html