github使用问题汇总

1. Permission denied

1.1. 问题描述

Permission denied (publickey).

fatal: Could not read from remote repository.

1.2. 解决方法

生成公钥

bash 复制代码
ssh-keygen -t ed25519 -C "your_email@example.com"

点击回车三次

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 haitao.xue@nio.com                               
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

相关推荐
修己xj9 小时前
解决Github QQ邮箱注册难题:绕过“Unable to verify your captcha response”错误
github
AI首席情报员_阿布12 小时前
2026 GitHub 最火的 10 个 AI Agent 框架:普通开发者的选型指南
github
阿里嘎多学长17 小时前
2026-01-11 GitHub 热点项目精选
开发语言·程序员·github·代码托管
三两肉17 小时前
HTTPS ECDHE 握手全解析
网络协议·https·github·rsa·echde
啊湘17 小时前
vscode 使用 github (适用CURSOR等使用)
ide·vscode·github·cursor·mcp
l1t18 小时前
利用DeepSeek辅助拉取GitHub存储库目录跳过特定文件方法
人工智能·github·deepseek
Hilaku18 小时前
我用 Gemini 3 Pro 手搓了一个并发邮件群发神器(附源码)
前端·javascript·github
逛逛GitHub20 小时前
GitHub 上 2300 人 Star 的 Claude Code 可视化工作流编辑器。
github
这儿有一堆花21 小时前
MusicFree:开源多平台聚合音乐软件
开源·github