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

相关推荐
xuhe22 小时前
AI时代一届计算机学生本科生 四年生活 保研记录: 四非本科 -> 中流985
ai·github·科研
小橙讲编程2 小时前
一键给 AI Agent 装上「互联网眼睛」:Agent Reach 深度解析与实战指南
人工智能·开源·github·ai编程
无人生还别怕3 小时前
搭建gitlab服务并接入openldap认证
git·gitlab·github·openldap·ldap·统一认证
小二·4 小时前
Python 异步编程深度解析:Async/Await 实战
网络·python·github
C++ 老炮儿的技术栈5 小时前
如何利用 OpenCV 将图像显示在对话框窗口上
c语言·c++·人工智能·qt·opencv·计算机视觉·github
奥利奥夹心脆芙7 小时前
选型与实战:Fluentd 全维对比与指标管道的 AWS ECS 落地
github
Hommy887 小时前
【开源剪映小助手】技术栈概览
开源·github·剪映小助手·视频剪辑自动化
梦梦代码精7 小时前
多商户电商系统二次开发真实体验:真开源与伪开源的差距
windows·docker·开源·github
晓说前端9 小时前
本地项目如何上传到远程仓库?(以Gitee为例,附GitHub说明)
gitee·github