R
R
RedSmoke_smr2021-07-01 20:02:20
Software Deployment
RedSmoke_smr, 2021-07-01 20:02:20

How to access and deploy multiple repositories with only one SSH key?

Hello!
Please tell me, I have such a problem:
I set up github actions on one repository, created a pair of SSH keys and wrote an action so that my project would be built (build was done), all dependencies were installed and the resulting dist folder was deployed to gh-pages. Everything works fine on one repository, the project is built, gh-page is created and the project is deployed, but as soon as I want to do the same procedure for another repository, the github gives me an error:

key already used

I read the git documentation and yes, indeed, git forbids using Deploy keys several times, i.e. if I want to automate another repository, I will again have to create an SSH pair and specify it in the action.
This does not suit me, and the documentation says that you can create a new github user, the so-called "Machine users", give him author access to the repository and create a pair of SSH at the account level, and he will somehow deploy all the projects in which the second account is a co-author of the repository, but nowhere is it written how to do this? How to add such an opportunity to the second account so that when pushing to the main account, it would launch a github action, build the project and deprofile it on gh-page?
If someone faced a problem with you, please help me to solve it)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question