Open mjurkus opened 2 years ago
We have the same issue and found this to be related to git clone and ssh key authentication.
Git clone will open a ssh connection to git@github.com
by looping over they private keys and selecting the first one that allows you to log in. However, at that stage, it is unaware of the repo you want to clone.
Consequently, in your example, git clone will always use secrets.REPO_1_PRVATE_KEY
which does not provide access to my-org/repo-2.git
.
We're currently using this gist as a hack to circumvent the issue: https://gist.github.com/vhermecz/4e2ae9468f2ff7532bf3f8155ac95c74
https://github.com/webfactory/ssh-agent#support-for-github-deploy-keys explains that it works by playing around with git's insteadOf configuration.
That might actually work as of poetry 1.2.0b3 per fixes for https://github.com/python-poetry/poetry/issues/5934 - upgrading is worth a try anyway
I had the same issue, and have worked around it by downgrading poetry:
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ jobs:
uses: AppThreat/sast-scan-action@master
- name: Install poetry
- run: pipx install poetry
+ run: pipx install poetry==1.1.14```
Looks like web factory is now handling this problem by mapping the right key to the right repo using key comment.
Same problem here, the action is a thing but if we need to handle this in all the CI builds, this quickly becomes unmaintainable :/
Any updates on this?
-vvv
option).Issue
I want to install 2 private packages from the GitHub repository:
I'm using https://github.com/webfactory/ssh-agent GitHub action to add 2 Deploy Keys. I'm also following these suggestions regarding multiple deploy keys: https://github.com/webfactory/ssh-agent#support-for-github-deploy-keys
Keys are successfully added and work when just running a simple
git clone git@github.com:my-org/repo-1.git
action.Unfortunately, this setup does not work with
poetry install
. When installing the firstssh-key
will be used andrepo-1
will be installed andrepo-2
will fail with an error similar to this:When using 1 repository and 1 deploy key - everything works as expected.