SPM & Github Enterprise Private Repo via SSH

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.