SPM & Github Enterprise Private Repo via SSH

Bitrise Build Issue Report template

Description of the issue

We have a variety of third party dependencies that we pull in via SPM. However, when I attempt to add a new dependency hosted in a private Github Enterprise repo via SSH bitrise fails the build. When I run locally through Xcode everything is lovely. Going through the logs of bitrise shows that it is attempting to use HTTPS instead of SSH. The project file clearly shows the SSH url is specified.

Environment:

Where did the issue happen?

Xcode 12.4.X

Which build Step causes the issue and which version of the step?

ios-auto-provision-appstoreconnect
version: 1.0.3
collection: GitHub - bitrise-io/bitrise-steplib: New Bitrise StepLib

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO

  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO

  • Does the issue happen sporadically, or every time? : Every time

  • Does upgrading the build Step to the latest version help? : NO

  • When did the issue start? : Since we’ve added this new dependency. It has never worked through bitrise. Runs completely fine through Xcode build locally.

Build log

Please copy paste the build’s bitrise.io URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - Contact us ), with a link to the related Discuss issue.

1 Like

Can anyone provide assistance?

Hi there @mikeberlin-vin :wave:

I’ve seen that you’ve also reached out to us via a ticket, and have discussed the current resolution of manually scripting what you needed to get done.
I’ve also read that one of the pain points is that the Xcode build for simulator Step does not export the .app file to the $BITRISE_DEPLOY_DIR at this time, which is a limitation we currently have.

I would like to support placing a customer feature requests at Feature Requests - Bitrise Discussions, to make sure it gets on the developer’s radar. Make sure to vote! :slight_smile:

Yep, there were a couple of issues we were having. This thread post was resolved by following this post that I found later on. It references Xcode 11 but I am still experiencing it in Xcode 12:

Basically it involves adding the domain where your repo is hosted to the VM’s .ssh/known_hosts file. I thought the workflow step Activate SSH key (RSA private key) also did this, but I was wrong. Basically added this line to our workflow and SSH urls resolved correctly afterwards (removed our internal domain, so replace it with yours. eg github.com).

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

Hope this helps anyone else that runs into the same issue.

For the second part, a big YES to expanding on the Xcode build for simulator step. I’ll be sure to add that as a feature request. That would be super helpful.

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