前言:今天在windows下git push代码到gitee的时候,报错:
$ git push 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 key变了
解决:
打开win10系统当前用户目录下的.ssh隐藏目录,把id_rsa.pub里面内容粘贴到gitee上面的公钥,然后提交代码就可以了
本文摘自 :https://www.cnblogs.com/