skip to Main Content

I’ve got a local Swift Package Manager package that uses a private Github repo as a dependency. When I open the local package with Xcode, it fails to “Resolve Packages” with this error:

Error while fetching remote repository: [email protected]:mayoff/Preamble.git

Server SSH Fingerprint Failed to Verify

Xcode error log showing the errors described above

However, if I use the command line swift program, it can clone the private repo. For example, I can run swift package show-dependencies in the local package’s directory without complaint. I can also successfully clone the remote package repo with git clone. So it’s not a problem with my .known_hosts file or my SSH key.

How do I fix Xcode’s complaint?

2

Answers


  1. Chosen as BEST ANSWER

    So it turns out the “Server SSH Fingerprint Failed to Verify” error message in Xcode's log navigator is double-clickable. Who'd have guessed?

    Anyway, double-clicking the error message brought up a dialog box that let me tell Xcode to trust the Github server:

    Xcode dialog box with a Trust button

    After I clicked the Trust button, Xcode was able to clone the remote repo.


  2. You can also edit the ~/.ssh/known_hosts file and remove the entry for github.com and let it try and resolve it again. This applies to any other website that may have had its certificate changed since the last time you tried to ssh.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search