LoginSignup
7
7

More than 1 year has passed since last update.

SHA1ハッシュを使ったRSA署名が使えなくなったとさ

Posted at

なんの記事

  • 久しぶりに新しいプロジェクトを作成し、リモートレポを作成しようとしたところ、以下のXcodeがエラーを吐いた。

エラー内容

  • エラー内容:You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.

原因

Dropping insecure signature algorithms
RSA keys (you’ll see ssh-rsa in the public key) are stronger than DSA keys, but older Git clients may use them in combination with a dated signature algorithm that uses SHA-1. Many SSH clients, including OpenSSH 7.2 and newer, support RSA with SHA-2 signatures (signature types rsa-sha2-256 and rsa-sha2-512), which are secure. However, other clients only support the older SHA-1 signatures. SHA-1 is weak, so we’ll stop allowing new RSA client keys to use SHA-1 signatures and require them to use SHA-2 signatures instead. Keys with a valid_after date before the deadline (November 2, 2021) may continue to use SHA-1 signatures for the time being.

解決方法

  • ターミナルで以下のコマンドを叩いて、ECDSAのSSH Keyを発行し、GithubにSSHKeyをアップロードする。
  • ssh-keygen -t ecdsa -b 521 -C “your_email@example.com
  • アップロード後、xcode>preferences> accounts> githutのSSH Keyの参照先をid_ecdsaに変更する。
  • ssh> config内に記載のIdentityFileの参照先をid_ecdsaに変える。
  • 注意:Githubから古いSSHKeyを削除し、ssh -T git@github.comをコマンドに打ち込み、新しいKeyでの認証を完了させないと、認証エラーが出ます。

参照

To Solve You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type Error Github is now not supported RSA keys with SHA-1 and that's why you are facing this error. Here What you can do is Just create a new SSH key with ECDSA and then add this key to Github. Just run this command: ssh-keygen -t ecdsa -b 521 -C “your_email@example.com” Then Just Upload it to GitHub Just after deleting your old key first, then update the SSH2 private key to point to id_ecdsa. Now you will be able to clone repositories and Now, your error must be solved. Thank You!.

参考にした記事

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7