执行命令
git pull
结果:
原因:
执行git remote -v 查看git地址采用了ssh方式:
切换为https方式即可,步骤:
首先要找到https方式的地址,如下图:
然后回到git命令界面执行:
$ git remote add origin https://github.com/XXXX/lagou.git
出现了:fatal: remote origin already exists.
因为我之前设置了ssh方式,这里使用命令:
$ git remote rm origin
解决
然后:$ git remote add origin https://github.com/XXX/lagou.git
再用git remote -v 查看发现已经变成了https方式了:
最后
git pull 成功
git pull提示Please make sure you have the correct access rights and the repository exists
最新推荐文章于 2023-09-07 10:14:27 发布