Project to showcase installing of python dependencies using github Actions from private git reporistories. Python library to install: aws-pylib (fork)
- Create a keypair somewhere using
ssh-keygen -t rsa -b 4096
without passphrase. Don't overwrite your current one ;) - Add a new Deploy key
ACTIONS_PIP_ACCESS_EXAMPLE_PROJECT_PUB
toaws-pylib
with the content of fileid_rsa.pub
- Add a new secret to this dependent project
pip-example-project
ACTIONS_PIP_ACCESS_EXAMPLE_PROJECT_PRIV
= content ofid_rsa
- Commit a change and see how the github actions
install-dep-ssh
is running
- Generate new keypair for each dependent application.
- If multiple libraries are required, add content of
id_rsa.pub
as a new deploy key to required repo.- For this save the
id_rsa.pub
inside the dependent project id_rsa.pub, so you can easily get the public key to add new deploy keys.
- For this save the
- Generate Personal access tokens with scope
repo
ACTIONS_PIP_ACCESS_EXAMPLE_PROJECT_TOKEN
- If you don't want to create the token on a real user, create a machine user git account and generate a token for each dependent repository.
- The machine user should only have read-access to the repositories.
- Add a new secret to this dependent project
pip-example-project
with same name:ACTIONS_PIP_ACCESS_EXAMPLE_PROJECT_TOKEN
= generated token - Commit a change and see how the github actions
install-dep-https
is running
- As it is a PAT, dependent project has access to ALL private repositories.