How to install private github repository via npm in github actions workflow ci #25408
-
I am trying to install npm dependencies within a github workflow ci by running
**ci.yml**
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @kaykhan , There is an action which could help you setup ssh-agent on GitHub Hosted runner.
You could copy the content of private ssh key (~/.ssh/id_rsa under the user folder ) in your local machine to a secret variable private_ssh. Then you could use the secret variable in your workflow with syntax ${{ secrets.varname }}. Please add webfactory/ssh-agent action in the front of npm install step. |
Beta Was this translation helpful? Give feedback.
Hi @kaykhan ,
There is an action which could help you setup ssh-agent on GitHub Hosted runner.
You could copy the content of private ssh key (~/.ssh/id_rsa under the user folder ) in your local machine to a secret variable private_ssh.
Then you could use the secret variable in your workflow with syntax ${{ secrets.varname }}. Please add webfactory/ssh-agent action in the front of npm install step.