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

相关推荐
freejackman2 小时前
Git从入门到精通
git·gitee·gitlab·github
Silence4Allen3 小时前
零基础用 Hexo + Matery 搭建博客|Github Pages 免费部署教程
github·hexo·博客搭建·matery
qianmoQ4 小时前
GitHub 趋势日报 (2025年05月16日)
github
兔子坨坨4 小时前
pycharm连接github(详细步骤)
windows·git·学习·pycharm·github
大大小小聪明11 小时前
Git合并多个提交方法详解
git·github
Yvonne爱编码16 小时前
CSS- 4.1 浮动(Float)
前端·css·html·github·html5·hbuilder
冷yan~18 小时前
GitHub文档加载器设计与实现
java·人工智能·spring·ai·github·ai编程
qianmoQ2 天前
GitHub 趋势日报 (2025年05月14日)
github
Yvonne爱编码2 天前
CSS- 2.1 实战之图文混排、表格、表单
前端·css·html·github·状态模式·html5·hbuilder
qianmoQ3 天前
GitHub 趋势日报 (2025年05月11日)
github