github使用问题汇总

1. Permission denied

1.1. 问题描述

Permission denied (publickey).

fatal: Could not read from remote repository.

1.2. 解决方法

生成公钥

bash 复制代码
ssh-keygen -t ed25519 -C "[email protected]"

点击回车三次

bash 复制代码
Generating public/private ed25519 key pair.                                                          
Enter file in which to save the key (/home/xxx/.ssh/id_ed25519): 
Enter passphrase (empty for no passphrase):                                                          
Enter same passphrase again:     
Your identification has been saved in /home/xxx/.ssh/id_ed25519
Your public key has been saved in /home/xxx/.ssh/id_ed25519.pub                             
The key fingerprint is:
SHA256:+plNIhibsYxRgWtH+mC08HoXLp62ylAB2YQgcZaddBk [email protected]                               
The key's randomart image is:
+--[ED25519 256]--+
|**+=o.Eo         |
|=+= +o.          |
| +.=.            |
|  Ooo            |
| +o=o.  S        |
|..o++B .         |
|.o.+* o . .      |
|o +    o *       |
|.+..    + .      |
+----[SHA256]-----+

读取公钥

bash 复制代码
cat ~/.ssh/id_ed25519.pub

把公钥填入到github中

参考文献

Generating a new SSH key and adding it to the ssh-agent - GitHub Docs

相关推荐
qianmoQ16 小时前
GitHub 趋势日报 (2025年06月14日)
github
梓羽玩Python18 小时前
12K+ Star的离线语音神器!50MB模型秒杀云端API,隐私零成本,20+语种支持!
人工智能·python·github
掘金安东尼18 小时前
9 个【宝藏工具】精选,大幅提升效率与灵感!
前端·面试·github
kymjs张涛19 小时前
前沿技术周刊 2025-06-16
前端·ios·github
独立开阀者_FwtCoder19 小时前
《独立开发工具 • 半月刊》 第 012 期
前端·javascript·github
独立开阀者_FwtCoder19 小时前
React 正式接入 AI
前端·javascript·github
马玉霞19 小时前
设置 某个文件git不提交,但是我不想写在 .gitignore 里面
前端·github
chatblog21 小时前
Hugo 自动化部署实战-部署 Hugo 到 Netlify
运维·自动化·github
Mr.stupidCoder1 天前
Git将本地文件推送到GitHub仓库
git·elasticsearch·github
草梅友仁1 天前
RSS Zero 项目预告 | 2025 年第 24 周草梅周报
开源·github·rss