I have seen some answers on the internet on how to clone private repositories in CI, but they seem to use Gitlab or Bitbucket. I want to do the same thing with Github Actions.
I have private repo A which depends on private repo B. When I try to execute 'cargo build' in Github Actions for repo A, I get this error:
error: failed to get `b` as a dependency of package `a`
Caused by:
failed to load source for dependency `b`
Caused by:
Unable to update https://github.com/me/b.git
Caused by:
failed to clone into: /home/runner/.cargo/git/db/b-c42bbf84fef750c8
Caused by:
failed to authenticate when downloading repository
* attempted to find username/password via git's `credential.helper` support, but failed
if the git CLI succeeds then `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
failed to acquire username/password from local configuration
I have seen something with SSH agents, but it looks very complex from my POV.