github 报错提示 ERROR: You're using an RSA key with SHA-1 ,RSA不能用,需要升级
ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
解决办法:
$ ssh-keygen -t ed25519 -C "your_email@example.com"
$ eval "$(ssh-agent -s)"
$ ssh-add id_ecdsa
$ cat ~/.ssh/id_ecdsa
$ ssh -T git@github.com
log
(pytorch) [yudong@admin1 Temp]$ git pull
ERROR: You are using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(pytorch) [yudong@admin1 .ssh]$ ssh-keygen -t ecdsa -b 521 -C "ydduong@163.com"
Generating public/private ecdsa key pair.
Enter file in which to save the key (/public/home/yudong/.ssh/id_ecdsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /public/home/yudong/.ssh/id_ecdsa.
Your public key has been saved in /public/home/yudong/.ssh/id_ecdsa.pub.
The key fingerprint is:
7a:3b:30:d8:b5:a3:5d:c7:85:8b:82:b6:75:2a:d8:fc ydduong@163.com
The key's randomart image is:
+--[ECDSA 521]---+
| |
| |
| . |
| . . . |
| o oS. o o |
| . *.= + + |
| =.B.* . |
| . *.+. |
| oE. |
+-----------------+
(pytorch) [yudong@admin1 .ssh]$ ls
authorized_keys config id_ecdsa id_ecdsa.pub id_rsa id_rsa.pub known_hosts
(pytorch) [yudong@admin1 .ssh]$ eval "$(ssh-agent -s)"
Agent pid 210477
(pytorch) [yudong@admin1 .ssh]$ ssh-add id_ecdsa
Identity added: id_ecdsa (id_ecdsa)
(pytorch) [yudong@admin1 .ssh]$ ssh-add id_rsa
Identity added: id_rsa (id_rsa)
(pytorch) [yudong@admin1 .ssh]$ cat id_ecdsa.pub
ecdsa-sha2-nistp521 AAAAE2VjZHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXkfa6XXXqOS62um3j8ZOXVdabpGwCRCVBLlxMNfmNPRNG2FEl3rkxpw2O91MAINv+JiXPU56sA== ydduong@163.com
(pytorch) [yudong@admin1 .ssh]$ ssh -T git@github.com
Hi ydduong! You have successfully authenticated, but GitHub does not provide shell access.
(pytorch) [yudong@admin1 .ssh]$ cd ../Temp/
(pytorch) [yudong@admin1 Temp]$ git pull
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 3), reused 6 (delta 3), pack-reused 0
Unpacking objects: 100% (6/6), done.
From github.com:ydduong/Temp
5e7379d..aec2a53 main -> origin/main
Updating 5e7379d..aec2a53
Fast-forward
Snipaste_2022-03-25_23-26-58.png | Bin 0 -> 238594 bytes
plt.py | 65 +++++++++++++++++++++++++++++++++++++++++++++++++----------------
2 files changed, 49 insertions(+), 16 deletions(-)
create mode 100644 Snipaste_2022-03-25_23-26-58.png
(pytorch) [yudong@admin1 Temp]$
|