当前位置:AIGC资讯 > AIGC > 正文

github使用问题汇总

1. Permission denied

1.1. 问题描述

Permission denied (publickey).

fatal: Could not read from remote repository.

1.2. 解决方法

生成公钥

ssh-keygen -t ed25519 -C "your_email@example.com"

 点击回车三次

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]-----+

 读取公钥

cat ~/.ssh/id_ed25519.pub

 把公钥填入到github中

参考文献

Generating a new SSH key and adding it to the ssh-agent - GitHub Docs

更新时间 2024-02-15