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

相关推荐
消防大队VUE支队18 分钟前
家里到底连了多少设备?这款开源神器让你一目了然
github
逛逛GitHub1 小时前
9 个 超绝的 AI 控制电脑 GitHub 开源项目。
github
QC七哥4 小时前
伪造git提交记录生成点阵字符
git·github
TimberWill5 小时前
GitHub Copilot 一键生成中文commit提示语规则设置
git·github
徐小夕5 小时前
pxcharts 多维表格开源!一款专为开发者和数据分析师打造的轻量化智能表格
前端·架构·github
NocoBase6 小时前
GitHub 上星星数量前 10 的 AI CRM 开源项目
人工智能·低代码·开源·github·无代码
CoderJia程序员甲7 小时前
GitHub 热榜项目 - 日榜(2025-12-22)
ai·开源·大模型·github·ai教程
cnnews8 小时前
某讯T1刷armbian
linux·ubuntu·开源·github
bj_zhb8 小时前
git reflog用法
大数据·linux·git·github