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

相关推荐
wflynn2 小时前
GitHub 日榜趋势速报 | 2026-10-28
开源·github
WebInfra8 小时前
Rspack 2.3 发布:联手 SWC 团队带来全新编译器
前端·javascript·github
wflynn8 小时前
GitHub 今日推荐|rea:用 MCP 把反编译器和 AI agent 接到一起的逆向工具
typescript·开源·github·agent·agent-skills·binary-analysis
m4Rk_9 小时前
【论文阅读】Agent记忆机制(114):MemoryTax——当 Agent 能自主搜索历史,专门的记忆系统还划算吗?
论文阅读·人工智能·学习·开源·github
IT星宿9 小时前
github-gravity:用 Rapier2D 把 GitHub 贡献图做成 SVG 物理动画
算法·github
miofly10 小时前
GitHub 今日推荐|elephant-goldfish-model:先审查设计草案再写代码
python·开源·github
u13013012 小时前
GitHub 热榜项目:日榜(2026-10-28)
人工智能·github
qq22987346612 小时前
LinkSwift 使用记录
github
MicrosoftReactor13 小时前
技术速递|在 GitHub Copilot App 中渲染超大型拉取请求
ai·github·copilot·虚拟化·拉取请求
miofly14 小时前
Gemini 4 Carbon发布:安全基准领先,幻觉率升至11%
开源·github