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

相关推荐
FreeBuf_14 分钟前
Salesloft Drift网络攻击事件溯源:GitHub账户失陷与OAuth令牌窃取
安全·github
第七种黄昏18 分钟前
GitHub 项目提交完整流程(含常见问题与解决办法)
github
确定过眼神!2 小时前
GitHub提交到公共项目流程
github·changeset
掘我的金2 小时前
mpc4j 在 macOS M3(Apple Silicon)上的部署实录:JDK 21(Preview)与 FourQ 缺失排错
github
油泼辣子多加4 小时前
[特殊字符] GitHub 热门开源项目速览(2025/09/09)
github
CoderJia程序员甲4 小时前
GitHub 热榜项目 - 日榜(2025-09-09)
ai·开源·大模型·github·ai教程
BillKu5 小时前
下载 Eclipse Temurin 的 OpenJDK 提示 “无法访问此网站 github.com 的响应时间过长”
github·openjdk·eclipse temurin
绝无仅有5 小时前
HTTP面试之实战经验与总结
后端·面试·github
绝无仅有5 小时前
职场面试redis经历之与一位资深技术面试官的技术问答与总结
后端·面试·github
老马啸西风11 小时前
v0.29.2 敏感词性能优化之基本类型拆箱、装箱的进一步优化的尝试
性能优化·开源·nlp·github·敏感词