如何解决[email protected]: Permission denied (publickey)异常

如何解决[email protected]: Permission denied异常

一、错误信息描述

[email protected]: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

原因:

权限被拒绝(公钥)。致命错误:无法从远程存储库读取。请确保您具有正确的访问权限并且存储库存在。

二、解决办法

2.1、获取本地SSH Key

  • 先执行ssh-keygen -t rsa -C '[email protected]', 看本地是否存在ssh key
  • 若本地存在,直接执行cat ~/.ssh/id_rsa.pub 获取,执行命令后如下

2.2、将本地的SSH Key添加到github


相关推荐
qianmoQ1 小时前
GitHub 趋势日报 (2025年06月08日)
github
Aisanyi4 小时前
【鸿蒙开发从入门到放弃】新建项目,并接入Git
github·harmonyos
今夕节度使5 小时前
通过 VS Code 连接 GitLab 并上传项目
git·elasticsearch·gitlab
陈 洪 伟6 小时前
复习Git命令、Git命令使用流程、VSCode+Git插件管理工程源码
git
百锦再8 小时前
Git 使用大全:从入门到精通
git·version·版本·代码·分支·code·clone
阿群的AI工作室8 小时前
新手必看喂饭级教程🔥原来这样用SSH推代码到GitHub才对!
github
中微子9 小时前
📝 终极Git Commit Message规范指南:写出专业级提交记录
git·github
小华同学ai9 小时前
真香,Cursor懂的都懂(学习用哈),22.5k一键重置Cursor试用限制!被全网疯狂收藏!
前端·后端·github
Android洋芋9 小时前
Steam++开发逻辑详解:从零到一的实战指南
后端·github