执行命令
git pull
结果:
git pull提示Please make sure you have the correct access rights and the repository exists
原因:
执行git remote -v 查看git地址采用了ssh方式:
git pull提示Please make sure you have the correct access rights and the repository exists
切换为https方式即可,步骤:
首先要找到https方式的地址,如下图:git pull提示Please make sure you have the correct access rights and the repository exists
git pull提示Please make sure you have the correct access rights and the repository exists
然后回到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提示Please make sure you have the correct access rights and the repository exists
最后
git pull 成功
git pull提示Please make sure you have the correct access rights and the repository exists

相关文章: