-
-
Notifications
You must be signed in to change notification settings - Fork 284
Description
Bug description
Have two packages hosted on github as private repos.
Getting this error:
An error occurred while resolving packages:
Project has invalid dependencies:
<package_id>: Error when executing git command. Failed to add the ECDSA host key for IP address '140.82.114.4' to the list of known hosts (/root/.ssh/known_hosts).
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(140.82.114.4 is a github.com ip)
How to reproduce
Yaml snippet:
# setup ssh agent to access private package repos in manifest
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY }}
${{ secrets.SSH_PRIVATE_KEY_TWO }}
# test git clone (this successfully clones the repos, suggesting ssh-agent is setup properly)
# - name: Git Clone Test
# run: |
# git clone [email protected]:<repo_1>.git
# git clone [email protected]:<repo_2>.git
# cd <repo_folder>
# ls
# Build
- name: Build project
uses: game-ci/unity-builder@v2
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
targetPlatform: iOS
sshAgent: ${{ env.SSH_AUTH_SOCK }}
Format in manifest is: ssh://[email protected]/<company>/<project>.git
Expected behavior
I expect it to successfully import these packages
Additional details
Followed these docs: https://game.ci/docs/github/builder#private-github-repositories
And ssh-agent docs: https://github.com/webfactory/ssh-agent
As per ssh-agent recommendations found, I also tried manually cloning the repos (see yaml) -- this worked fine, so I don't think there's an issue with my ssh-agent setup. Seems to break only when importing packages. If it matters, I did notice this log when I manually cloned: Warning: Permanently added the ECDSA host key for IP address '140.82.114.3' to the list of known hosts.
(140.82.114.3 is another github ip). Maybe the problem has to do with it failing to do so in unity-builder container?
Also tried webfactory/[email protected]
(what's currently in Game-CI docs).
Have tried other formats in the manifest (one above seems closest to what Unity prescribes) with no luck. Tried the url format in terminal and it seems to work:
Hi <company>/<project>! You've successfully authenticated, but GitHub does not provide shell access.
So as far as I can tell, I have everything configured correctly on my end. Any ideas?