前言:今天在windows下git push代碼到gitee的時(shí)候,報(bào)錯(cuò):
$ 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.
?
原因:我電腦重裝過(guò)了,可能ssh key變了
?
解決:
打開(kāi)win10系統(tǒng)當(dāng)前用戶目錄下的.ssh隱藏目錄,把id_rsa.pub里面內(nèi)容粘貼到gitee上面的公鑰,然后提交代碼就可以了
?
?
?
本文摘自 :https://www.cnblogs.com/