github Error: ERROR: You're using an RSA key with SHA-1
,RSA can not used and need to upgrade:
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.
Solution:
# Generate a new secret key, if you report an error unknown key type ed25519, use this: ssh-keygen -t ecdsa -b 521 -C "[email protected]", all the way back to the car (the first carriage return is the name of the generated secret key, do not give the default, the last two are the password, you can do without)
$ ssh-keygen -t ed25519 -C "[email protected]"
# start ssh proxy, use different commands depending on the environment
$ eval "$(ssh-agent -s)"
# Add the secret key to the agent, and if there are other previous secret keys, add them too
$ ssh-add id_ecdsa
# View the secret key and copy and paste it to GitHub
$ cat ~/.ssh/id_ecdsa
# Test, it's best to pull a project to see if it can be accessed
$ ssh -T [email protected]
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 "[email protected]"
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 [email protected]
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
# start shh proxy
(pytorch) [yudong@admin1 .ssh]$ eval "$(ssh-agent -s)"
Agent pid 210477
# add proxy
(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)
# check the public key
(pytorch) [yudong@admin1 .ssh]$ cat id_ecdsa.pub
ecdsa-sha2-nistp521 AAAAE2VjZHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXkfa6XXXqOS62um3j8ZOXVdabpGwCRCVBLlxMNfmNPRNG2FEl3rkxpw2O91MAINv+JiXPU56sA== [email protected]
# test
(pytorch) [yudong@admin1 .ssh]$ ssh -T [email protected]
Hi ydduong! You have successfully authenticated, but GitHub does not provide shell access.
(pytorch) [yudong@admin1 .ssh]$ cd ../Temp/
# test
(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]$
Read More:
- [Solved] Git Error: client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0
- [Solved] Consul Error: github.com/boltdb/bolt github.com/boltdb/bolt github.com/hashicorp/raft-boltdb
- [Solved] Gitee generates public key error: Enter file in which to save the key…
- Introduce wangeditor5 to run an error: You may need an appropriate loader to handle this file type (es6 compatibility issue)
- [Solved] Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest FAILED和cannot install, GOBIN must be an ab
- [step on the pit] idea submits the code to GitHub and prompts 403 — the requested URL returned error: 403
- E11000 duplicate key error collection: *** index: _id_ dup key
- [Solved] GitHub Error: remote: Support for password authentication was removed on August 13, 2021.
- [Solved] Error creating bean with name ‘enableRedisKeyspaceNotificationsInitializer‘ defined in class path re
- [Solved] LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- Proguard Packaging Error: You have to specify ‘-keep‘ options if you want to write out kept elements with ‘-print
- [Solved] Faceswap Error: CRITICAL An unexpected crash has occurred.You MUST provide this file if seeking assistan
- [Solved] SecureCRT Error: Key exchange failed. No compatible key exchange method.
- [Solved] RSA encryption request error: javax.crypto.badpaddingexception: decryption error
- Git Push Error: failed to push some refs to ‘[email protected]:
- Error: Host Key Verification Failed [How to Solve]
- [Solved] LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
- [Solved] pagehelper Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 1’
- [Solved] Git Run Error: Could not resolve host: github.com
- [Solved] Win10: Failed to connect to github.com port 443 Timed out