Xcode 11 resolving packages fails with SSH fingerprint

Please report back once you have enabled support access. Thanks!

Done!

cc @Roland-Bak

Hi @kylebrowning

It looks like there is a caching issue with thw xcode-test step:

xcodebuild: error: Could not resolve package dependencies:
The repository at /Users/vagrant/Library/Developer/Xcode/DerivedData/theathletic-ios-ayneesswxytxscaivlorfoznkuky/SourcePackages/repositories/SwiftyJSON-9be1ce9c is invalid; try resetting package caches

Please clear the Build Cache, or disable caching in the xcode-test step if that is not helping. There is known issue with our caching implementation.

So my options are, have fast, cached builds, which sometimes fail, or disable caching on builds, but have longer builds which take up build time and resources across our organization for testing/deployment?

Are there any timelines on when these known issues for caching are going to be resolved? Disabling cache is basically a non-starter as it makes our builds go from 10 minutes to 45 minutes on elite machines.

The caching issue is unrelated to the original SSH fingerprint issue.

xcodebuild: error: Could not resolve package dependencies:
The repository at … is invalid; try resetting package caches

We released a new version of the cache-push step that resolves this (Release 2.3.0 · bitrise-steplib/steps-cache-push · GitHub). For workflows using xcode-test clearing the build cache may be needed, but should not encounter this issue again.

Hi, I’m struggling with the same SSH fingerprint issue.

Can you please give more detailed instructions about this:

Firstly I added an ‘Activate SSH key (RSA private key)’ step, setting the ‘SSH private key in RSA format’ to a variable name, eg: ‘$DEPLOYMENT_KEY’ (this has to be done manually in .yml). Then create a secret for that variable with the value of the private key. In my case this the private key for the GitHub Deployment Key for the private dependency.

What exactly do I do in the yml?

In case it’s useful for anyone - I tried most of the above suggestions and still was getting SSH errors, but I fixed it by going to my Bitrise app settings, clicking “Change SSH Keypair”, and clicking the middle option - “Generate SSH Keypair”. I then added the generated public key to Github.

2 Likes

In fact, there seems to be two potentials problems. Credentials for private repo referenced as SSH (git@github.com:[…]/…) is one and others pointed at the solution in this thread.

But it turns out you may have package referencing others as HTTPS (https://github.com/[..]/…), I ran into this issue and got lucky finding this topic . It turns out it works super fine to just for Xcode to find its credentials to use Authenticate host with netrc.

Hope it helps.

Getting the same error (i.e The server SSH fingerprint failed to verify.) with my build, using externally hosted GitLab instance.
Adding the script writing to ~/.ssh/known_hosts does not help.
I’ve noticed that passing the option -scmProvider system to xcodebuild helps but it’s not possible to easily pass it to the XCode Test of iOS step.

You can set it in the Xcode Test step’s xcodebuild configuration section, Additional options for the xcodebuild command