Hi, I have a private dagger module that expects a Git repo location (also private) as a directory argument. Run locally, it works as expected and the private git repo is cloned fine.
When running in GitHub, I see the error below.
Command
- name: Run StackHawk via CLI run: | curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh dagger version dagger -m git@github.com:<private-daggerverse>.git/<module>@v0.34.1 call \ <function> \ --template-repo=git@github.com:<private-repo-arg>.git@main
Output
! failed to convert result: failed to load cache key: error fetching default branch for repository git@github.com:<private-repo-arg>.git: git error: exit status 128 stderr: ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Everything in < > is replaced and I checked the following:
- My credentials / url are correct for the private repo being passed as an arg.
I have two deploy keys set using the webfactory/ssh-agent@v0.9.0 GitHub Action. One is to access our private daggerverse repo and the other is for the private repo arg.
- I have a step after setting the creds to directly try cloning the repo arg via git clone and it works.
- I've checked that SSH_AUTH_SOCK matches what's returned by webfactory/ssh-agent@v0.9.0 and that each of the keys have been added by running
ssh-add -l
-
It's not the GitHub Action
I've tried both the dagger/dagger-for-github@v6.0.0 GitHub Action and dagger CLI with the same result -
Doesn't appear that the issue is when multiple keys are loaded (at least not locally) https://github.com/dagger/dagger/issues/8288
This works locally when multiple keys are specified using ssh-add and fails when the repo arg one is removedssh-add -D
Any suggestions on what to test next? Thanks in advance 🙂
Following a discussion with @aweris #1279115372116705422 message I don't think this is a socket forward issue, but more a config on ou...