I'd like to have my python app depend on a private github repo (say ORG/REPO). I've added the line git ssh://[email protected]/ORG/REPO.git
to my requirements.txt and followed the steps in https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-ssh-key. I've also tried adding the same BUILDPACK_SSH_KEY config var to the pipeline-level 'Test run config vars'.
BUILDPACK_SSH_KEY is a github deploy key
However, when I run tests in CI I'm getting an error:
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: subprocess-exited-with-error
git clone --filter=blob:none --quiet 'ssh://****@github.com/ORG/REPO.git' /tmp/pip-req-build-v9dtvjom did not run successfully.
│ exit code: 128
╰─> See above for output.
Do these features (buildpack ssh config and pipelines) work together?
CodePudding user response:
Figured it out - for ci the buildpacks are defined in app.json, not via the buildpacks:set command
CodePudding user response:
ssh://****@github.com/ORG/REPO.git
I hope the ****
is actually 'git
', as in ssh://[email protected]/ORG/REPO.git
.
Because if it is anything else..., an SSH query to GitHub will not work, no matter the SSH key used is.
So make sure to use 'git
' as a user for the SSH URL.