- access token
# Use a https link. It's important for the authentication part.
gem "your_gem", git: "https://github.com/<owner>/<repo>.git", branch: "your_branch"
1.1 Setup Token
1.2 put into env as BUNDLE_GITHUB__COM
detail
name: your_job
jobs:
your_job:
runs-on: ubuntu-latest
env:
BUNDLE_GITHUB__COM: "x-access-token:${{ secrets.YOUR_SECRET_NAME }}"
- generate deployment key with
ssh-keygen -t rsa -b 4096 - create and paste the key to new deployment key
- add private key of 1 to repo trying to access private repo as
Actions Secret - use secret in Github Actions
single key
# .github/workflows/ci.yml
jobs:
compile-and-test:
...
steps:
...
- name: Give GitHub Actions access to Michael-F-Bryan/my-secret-repo
uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.SECRET_REPO_DEPLOY_KEY }}multiple keys
# ... contents as before
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: |
${{ secrets.FIRST_KEY }}
${{ secrets.NEXT_KEY }}
${{ secrets.ANOTHER_KEY }}multile keys from here
https://github.com/marketplace/actions/webfactory-ssh-agent