Closed
Description
I am trying to install 2 or more private GitHub repositories as an NPM dependency to another project.
In my package.json
file, I have dependencies from GitHub in the following format:
"***-plugin": "git+ssh://git@github.com:***/******.git#1bdfa1248fe92b4ba239aca37c686c72898ccab5",
The following is a part of my github action yml file:
- name: Setup SSH Keys and known_hosts
uses: webfactory/ssh-agent@v0.3.0
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY }}
${{ secrets.ANOTHER_SSH_PRIVATE_KEY }}
The SSH_PRIVATE_KEY
s are added as deploy keys to this repo.
In the next step, I try to run npm install
.
Now based on the order of the private keys, only one of these dependencies installs successfully.
I have tried to change the order of these ssh keys, which changes the dependency that cannot be installed.
Is it possible to use deploy keys to access both the private repositories in this case?
Let me know if you need more information.