hotg-ai / rune

Rune provides containers to encapsulate and deploy edgeML pipelines and applications
Apache License 2.0
134 stars 15 forks source link

Set up the SSH agent for CI #52

Closed Michael-F-Bryan closed 3 years ago

Michael-F-Bryan commented 3 years ago

We accidentally broke master when #51 was merged because the fft proc block tries to pull in sonograph (a private hotg-ai repo) as a git dependency.

CI Failure Message ``` /usr/share/rust/.cargo/bin/cargo check --workspace --verbose Updating crates.io index Updating git repository `ssh://git@github.com/hotg-ai/sonogram` error: failed to get `sonogram` as a dependency of package `FFT v0.1.0 (/home/runner/work/rune/rune/proc_blocks/fft)` Error: failed to get `sonogram` as a dependency of package `FFT v0.1.0 (/home/runner/work/rune/rune/proc_blocks/fft)` Caused by: failed to load source for dependency `sonogram` Caused by: Unable to update ssh://git@github.com/hotg-ai/sonogram#39d4c460 Caused by: failed to clone into: /home/runner/.cargo/git/db/sonogram-b77ca210ffbc4b64 Caused by: failed to authenticate when downloading repository * attempted ssh-agent authentication, but no usernames succeeded: `git` 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: error authenticating: no auth sock variable; class=Ssh (23) ```

To let CI use other private repos we need to:

After that, SSH authentication should work and CI will pass again.

If it doesn't, we might need to tell cargo to shell out to git instead of using the compiled-in libssh2 by setting git-fetch-with-cli = true under the [net] table in .cargo/config.

We may also want to set up GitHub's protected branches so nobody can push directly to master and CI needs to pass before a PR can be merged.

Michael-F-Bryan commented 3 years ago

No longer necessary.