Xcode can't handle key encryption Ed25519

Viewed 944

More than a question this is a sharing information post.

If you pull private repos via SSH, you should create an id_ecdsa because Xcode does not accept Ed25519 key, instead since github does not accept RSA-SHA1 anymore since yesterday.

https://github.blog/2021-09-01-improving-git-protocol-security-github/

To generate it use: ssh-keygen -t ecdsa -C "your_email@example.com"

You can follow the next steps of config from here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent

1 Answers

These are end to end steps for fixing this problem:

Steps:

  1. ssh-keygen -t ecdsa -C "your_email@example.com" (Same as what OP said)
  2. pbcopy < ~/.ssh/id_ecdsa.pub
  3. Go to Github -> Login -> Settings -> SSH & GPG Keys -> type "Xcode" for the title and command paste the RSA key
  4. Go to Xcode -> Preferences -> Sign into the github account if not already.
  5. Select SSH for "Clone using"
  6. For SSH Key select id_ecdsa. Make sure you select the private key, not the public.
Related