# Xcode 11 resolving packages fails with SSH fingerprint

**URL:** <https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388>\
**Category:** Builds\
**Tags:** ios\
**Created:** [September 27, 2019, 8:54pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388 "2019-09-27T20:54:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvachon](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@cvachon](https://discuss.bitrise.io/u/cvachon)\
**Post date:** [September 27, 2019, 8:54pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/1 "2019-09-27T20:54:41Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

Xcode 11 fails to resolve packages (Swift Package Manager) because of SSH Fingerprints check. This is a known issue at Apple and they provide a workaround [https://developer.apple.com/documentation/xcode\_release\_notes/xcode\_11\_release\_notes](https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes) (see issue #50686014). But the thing is, I can’t get it to work… Does anybody managed to resolve this issue?

## Environment:

[Bitrise.io](http://Bitrise.io): Stack: Xcode 11, macOS 10.14.5 (Mojave)  
Step: Xcode Archive and export for iOS

## Reproducibility

- Have an Xcode 11 project that uses Swift Package Manager with private package (like hosted on Bitbucket)

## Build log

Fetching [git@bitbucket.org](mailto:git@bitbucket.org):[owner\_name]/[repo\_name].git  
xcodebuild: error: Could not resolve package dependencies:  
The server SSH fingerprint failed to verify.

---

<div class="post-metadata">

**Author:** ![johnmorrell](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/johnmorrell/32/2037_2.png) [@johnmorrell](https://discuss.bitrise.io/u/johnmorrell)\
**Post date:** [September 30, 2019, 10:37pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/2 "2019-09-30T22:37:42Z")

</div>

I have just hit this issue and I was able to work around thanks to your reference to the Xcode issue. In my case I have a GitHub hosted iOS project with a private package hosted on a separate GitHub repo. I had to add two steps between the project checkout and building the app:

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.

Secondly as per the Apple workaround, I needed to add an entry to the known\_hosts file. This can be done via a ‘Script’ step. For GitHub, you can use:

```auto
for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts

```

This is working and I expect you can achieve the same with Bitbucket.

---

<div class="post-metadata">

**Author:** ![danielsaidi](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/danielsaidi/32/2545_2.png) [@danielsaidi](https://discuss.bitrise.io/u/danielsaidi)\
**Post date:** [October 2, 2019, 5:50am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/3 "2019-10-02T05:50:53Z")

</div>

We are having the same problem, but I’m happy to say that this workaround works for [bitbucket.org](http://bitbucket.org) as well. Let’s hope that Fastlane or Bitrise can come up with a lane/step that solves this.

---

<div class="post-metadata">

**Author:** ![danielsaidi](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/danielsaidi/32/2545_2.png) [@danielsaidi](https://discuss.bitrise.io/u/danielsaidi)\
**Post date:** [October 7, 2019, 10:16am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/4 "2019-10-07T10:16:02Z")

</div>

A quick follow up and maybe some more help if the above doesn’t work for you.

This workaround worked for our internal dependencies, which depend on each other. However, it didn’t work for the main app, which depends on all of them. The builds once again failed with the fingerprint error.

After digging around without finding anything strange, we added a known host printout build step and could verify that the script did in fact add new hosts. However, the format was off.

Looking into our workflows, we noticed that a line break had made its way into the script. This caused the script to add new hosts with an incorrect format. Removing the line break made this workaround work once more.

---

<div class="post-metadata">

**Author:** ![ahvth-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/ahvth-bitrise/32/2468_2.png) [@ahvth-bitrise](https://discuss.bitrise.io/u/ahvth-bitrise)\
**Post date:** [October 7, 2019, 11:12am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/5 "2019-10-07T11:12:53Z")

</div>

Hi there @danielsaidi! 👋

Can you please send me the URL for a relevant build where I can take a look at your workflow configuration and see what you’ve tried so far? Thanks! 😄

P.S. That would be a URL starting with `app.bitrise.io/build`. 😄

---

<div class="post-metadata">

**Author:** ![danielsaidi](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/danielsaidi/32/2545_2.png) [@danielsaidi](https://discuss.bitrise.io/u/danielsaidi)\
**Post date:** [October 7, 2019, 11:23am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/6 "2019-10-07T11:23:15Z")

</div>

Hi! It was a boy cried wolf situation. The script had been incorrectly added to our app’s workflows. Removing the line break made the workaround work once more.

---

<div class="post-metadata">

**Author:** ![ahvth-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/ahvth-bitrise/32/2468_2.png) [@ahvth-bitrise](https://discuss.bitrise.io/u/ahvth-bitrise)\
**Post date:** [October 7, 2019, 11:59am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/7 "2019-10-07T11:59:52Z")

</div>

Glad to hear that everything’s working for you now. 😄

---

<div class="post-metadata">

**Author:** ![jakobvi](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jakobvi](https://discuss.bitrise.io/u/jakobvi)\
**Post date:** [October 8, 2019, 10:40am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/8 "2019-10-08T10:40:12Z")

</div>

Ran into another problem with bitrise+fastlane+SPM.

- Found that using Swift Package Manager with https resolved in missing credentials. Worked around that by pointing to the SSH version.
- Used the tricks posted by @Dosium to get the authentication and the workaround for Github and Bitbucket
- Fastlane then failed during dependency resolution. Adding a step prior to the `fastlane` step, calling `xcodebuild -showBuildSettings` triggers a resolve dependencies as a side-effect, thanks to [https://github.com/fastlane/fastlane/issues/15301#issuecomment-531883355](https://github.com/fastlane/fastlane/issues/15301#issuecomment-531883355)
- Setting `ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"]` = “30” to avoid fastlane timing out.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [November 7, 2019, 10:40am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/9 "2019-11-07T10:40:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)\
**Post date:** [December 7, 2019, 8:58am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/10 "2019-12-07T08:58:38Z")

</div>



---

<div class="post-metadata">

**Author:** ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)\
**Post date:** [December 7, 2019, 8:58am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/11 "2019-12-07T08:58:49Z")

</div>

Thanks for sharing all of that @jakobvi!

---

<div class="post-metadata">

**Author:** ![Robuske](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/robuske/32/2765_2.png) [@Robuske](https://discuss.bitrise.io/u/Robuske)\
**Post date:** [February 5, 2020, 12:43am UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/12 "2020-02-05T00:43:15Z")

</div>

Even after following everything stated here I was still having problems. Here is my solution:

To start, the `fastlane` build command uses the `-resolvePackageDependencies` since the last version (2.141.0), so there is no need to call `-showBuildSettings`

Use the script to add the IPs to the `known_hosts`

I was using HTTPS for the open dependencies and SSH for the private one, but for some reason if I set all my external dependencies to use the SSH URL (_[git@github.com](mailto:git@github.com):…_) it works. I have no idea what is happening and why it works, but it works.

---

<div class="post-metadata">

**Author:** ![non-binary](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/non-binary/32/2764_2.png) [@non-binary](https://discuss.bitrise.io/u/non-binary)\
**Post date:** [February 20, 2020, 9:44pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/13 "2020-02-20T21:44:20Z")

</div>

Thanks for sharing all of that @Robuske!

---

<div class="post-metadata">

**Author:** ![novinfard](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/novinfard/32/2867_2.png) [@novinfard](https://discuss.bitrise.io/u/novinfard)\
**Post date:** [March 29, 2020, 3:06pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/14 "2020-03-29T15:06:24Z")

</div>

I still have the same issue and don’t know how to resolve it.

---

<div class="post-metadata">

**Author:** ![kylebrowning](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/kylebrowning/32/2589_2.png) [@kylebrowning](https://discuss.bitrise.io/u/kylebrowning)\
**Post date:** [April 3, 2020, 9:20pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/15 "2020-04-03T21:20:08Z")

</div>

This issue happens pretty randomly , and is a cause for failures in our test suite.

Rebuilding fixing it, but its rather annoying as it interrupts workflow.

---

<div class="post-metadata">

**Author:** ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)\
**Post date:** [April 7, 2020, 12:02pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/16 "2020-04-07T12:02:48Z")

</div>

Hi @kylebrowning and @novinfard!

Sorry to hear about this. Can you please send the relevant build URLs our way, enable support access and any other details you may attribute to this so we can look into it deeper?

---

<div class="post-metadata">

**Author:** ![kylebrowning](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/kylebrowning/32/2589_2.png) [@kylebrowning](https://discuss.bitrise.io/u/kylebrowning)\
**Post date:** [April 9, 2020, 4:31pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/17 "2020-04-09T16:31:47Z")

</div>

sure. @bitce [https://app.bitrise.io/build/3913f65679566a82#?tab=log](https://app.bitrise.io/build/3913f65679566a82#?tab=log)

---

<div class="post-metadata">

**Author:** ![kylebrowning](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/kylebrowning/32/2589_2.png) [@kylebrowning](https://discuss.bitrise.io/u/kylebrowning)\
**Post date:** [April 10, 2020, 8:20pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/18 "2020-04-10T20:20:33Z")

</div>

Heres another, [https://app.bitrise.io/build/77c48010510a88ff#?tab=log](https://app.bitrise.io/build/77c48010510a88ff#?tab=log)

---

<div class="post-metadata">

**Author:** ![kylebrowning](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/kylebrowning/32/2589_2.png) [@kylebrowning](https://discuss.bitrise.io/u/kylebrowning)\
**Post date:** [April 14, 2020, 7:11pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/19 "2020-04-14T19:11:01Z")

</div>

Heres another. [https://app.bitrise.io/build/129fe4f3bd7fe549#?tab=log](https://app.bitrise.io/build/129fe4f3bd7fe549#?tab=log)

Another: [https://app.bitrise.io/build/1f902855b33ed5ae#?tab=log](https://app.bitrise.io/build/1f902855b33ed5ae#?tab=log)  
[https://app.bitrise.io/build/2efcabd8881103b1#?tab=log](https://app.bitrise.io/build/2efcabd8881103b1#?tab=log)  
[https://app.bitrise.io/build/f8265001e63210ba#?tab=log](https://app.bitrise.io/build/f8265001e63210ba#?tab=log)

This is basically a daily occurrence now.

EDIT:  
@bitce any update here? Having false negatives for failing is really disruptive. Id be happy to change my configuration if its user error, but Im at a loss over here.

---

<div class="post-metadata">

**Author:** ![Roland-Bak](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/roland-bak/32/3480_2.png) [@Roland-Bak](https://discuss.bitrise.io/u/Roland-Bak)\
**Post date:** [April 27, 2020, 12:24pm UTC](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388/20 "2020-04-27T12:24:18Z")

</div>

Hey there @kylebrowning!

We are looking into your logs, which are currently investigated by higher tier support, but could you please enable Support Access on the Settings tab of the app ([Enabling the Bitrise Support user for your app | Bitrise DevCenter](https://devcenter.bitrise.io/troubleshooting/enabling-bitrise-support-user/)), so that I may take a closer look? 🙂

[Next page](https://discuss.bitrise.io/t/xcode-11-resolving-packages-fails-with-ssh-fingerprint/10388.md?page=2)
