如何解决[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


相关推荐
网硕互联的小客服1 小时前
503 Service Unavailable:服务器暂时无法处理请求,可能是超载或维护中如何处理?
服务器·git·github
abcnull3 小时前
github开源协议选择
git·github·开源协议
安庆平.Я5 小时前
git互联GitHub 使用教程
git·github
掘金安东尼6 小时前
字节-Trae、阿里-通义灵码、腾讯-CodeBuddy,为什么都在“卷”AI编码?
面试·llm·github
独立开阀者_FwtCoder8 小时前
Cursor 1.0 重磅发来袭(毛骨悚然,开始学习你如何编码)
前端·javascript·github
几道之旅8 小时前
gitcode与github加速计划
github·gitcode
WindrunnerMax10 小时前
从零实现富文本编辑器#5-编辑器选区模型的状态结构表达
前端·架构·github
自来也_11 小时前
Git配置代理
git
寻月隐君12 小时前
探索Web3新速度:Sonic高性能Layer-1上的BlindAuction智能合约实践
后端·web3·github
油泼辣子多加12 小时前
2025年06月07日Github流行趋势
github