Home > Enterprise >  Xcode can't handle key encryption Ed25519
Xcode can't handle key encryption Ed25519

Time:03-17

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 "[email protected]"

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

CodePudding user response:

These are end to end steps for fixing this problem:

Steps:

  1. ssh-keygen -t ecdsa -C "[email protected]" (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.

CodePudding user response:

Not working for me. Everything looks fine, Xcode has github logged in, I created the ECDSA key, key uploaded to github... But when I reset the SPM caches it says it fails due to credentials missing.

Update: Looks like Xcode 13.2 was the one to blame. I updated to Xcode 13.3. It asked for my key's passphrase and then everything worked.

  • Related