Xcode 11.1 Swift Package Manager and BitBucket private repo issue

getting this error when trying to add my own swift package from a BitBucket private repo:

Fetching user@bitbucket.org:abcdef/org.git
[16:51:03]: ▸ xcodebuild: error: Could not resolve package dependencies:
[16:51:03]: ▸ The server SSH fingerprint failed to verify.

All of my other Git commands are working correctly, how do I control the SSH key that Xcode uses to fetch dependencies? I saw the below workaround for GitHub, but the workaround doesn’t seem to work for me (of course replacing GitHub.com with bitbucket.org).

  • run:
    name: Override GitHub URL rewriting
    command: |
    git config --global --unset url.“ssh://git@github.com”.insteadOf &&
    git config --global url.“ssh://git@github.com/my-org”.insteadOf “https://github.com/my-org

Hi Chris,

This is caused by an Xcode bug in the way that it handles SSH keys. For more information about this, please see the following article for a workaround: Swift Package Manager fails to clone from private Git repositories

I hope this helps!

Hi, thanks for the heads up about the article. Can you help point to documentation on how to authenticate with BitBucket via an app password through Xcode? It works locally, but I’m not sure if there is a specific environment variable that I should set for the app password or how that works since Xcode controls that interaction.