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

相关推荐
稚麟4 分钟前
GitHub Copilot CLI: How to get started
github·copilot
逛逛GitHub2 小时前
老外吹爆的国产开源 AI 大模型,登顶了开源热榜第 1。
github
天玺-vains4 小时前
借助Github Action实现通过 HTTP 请求触发邮件通知
网络协议·http·github
zachhere8 小时前
构建你的第一个 ChatGPT 应用 | 使用 Apps SDK 的逐步教程
github
HelloGitHub10 小时前
降薪跳槽,投身开源!只为 AI 落地“最后一公里”
开源·github
百锦再11 小时前
第5章 所有权系统
运维·git·python·eclipse·go·github·负载均衡
赵文宇(温玉)20 小时前
构建内网离线的“github.com“,完美解决内网Go开发依赖
开发语言·golang·github
牛奶咖啡1320 小时前
利用Github与Hexo搭建属于自己的在线个人博客
github·hexo创建静态博客·免费部署博客到公网上·创建自定义静态博客·将静态博客上传到github·将自己的网站发布到网上
散峰而望20 小时前
C++入门(一)(算法竞赛)
c语言·开发语言·c++·编辑器·github