报错git@gitee.com: Permission denied (publickey).

前言:今天在windows下git push代码到gitee的时候,报错:

1
2
3
4
5
6
$ 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上面的公钥,然后提交代码就可以了

 

 

 

posted @   lucky_tomato  阅读(618)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
历史上的今天:
2021-05-11 使用python实现钉钉告警通知功能
点击右上角即可分享
微信分享提示