出现上述情况的可能原因是你git clone时用的是原生的git协议
例如 git clone git@github.com/username/user_repo.git
当然很多人用 git clone https://github.com/username/user_repo
其实用第一种方法clone仓库是快于第二种方法的,但是注意第一种这么clone下来不能直接git push
解决办法是
- git remote rm origin 先把远程仓库删了
- git remote add origin git@github.com:username/user_repo.git
来源:CSDN
作者:m0_45478865
链接:https://blog.csdn.net/m0_45478865/article/details/103687786