描述:
昨天正常使用,今天来pull更新代码就出现以下提示,本windows上很多项目都是这种情况,重新从gitee上clone下来代码就可以正常pull和push,应该是git配置文件出现问题,但是多个项目都是这种情况。
git@gitee.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方案:
第一步 重新生成ssh
ssh-keygen -t rsa -C xxx@xxx.com.cn
查看你生成的公钥
cat ~/.ssh/id_rsa.pub
将它添加到码云
https://gitee.com/profile/sshkeys