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

相关推荐
念丶小宇9 小时前
Github上传大文件
github
极智-99613 小时前
GitHub 热榜项目-日榜精选(2026-02-03)| AI智能体、终端工具、RAG技术等 | claude-mem、99、termux-app等
人工智能·网络安全·github·ai智能体·llm应用·rag技术·torrent工具
骂我的人都死了14 小时前
DevOps架构部署
运维·ubuntu·docker·k8s·github·devops·python3.11
Alaaaaaaan14 小时前
[DevOps]使用github-action工具部署docker容器(实现提交代码一键推送部署到服务器)
服务器·前端·docker·容器·github
CryptoRzz15 小时前
德国股票数据 API 对接实战(DAX 指数与实时行情)
websocket·区块链·github·分布式账本
Tipriest_15 小时前
GitHub Gist 功能详解:从入门到进阶
github·gist
困惑阿三16 小时前
CloudflarePages+GitHub零成本博客搭建手册
github
猫头虎18 小时前
2026全网最热Claude Skills工具箱,GitHub上最受欢迎的7大Skills开源AI技能库
langchain·开源·prompt·github·aigc·ai编程·agi
CoderJia程序员甲18 小时前
GitHub 热榜项目 - 日榜(2026-02-03)
git·ai·开源·llm·github
MicrosoftReactor20 小时前
技术速递|使用 GitHub Copilot SDK 将智能体集成到任何应用中
ai·github·copilot