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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM