Open
Description
Not able to check out another private repo using secrets.GITHUB_TOKEN. Below the scenario, check out 1, and 2 works. 3 fails. Is there a limitation for secrets.GITHUB_TOKEN on remote repos?
repo-1 from for which GitHub action is running and repo-2 that it's trying to checkout is in the same org
jobs:
test:
name: test
runs-on: self-hosted
container: node:14-bullseye
steps:
- name: Checkout 1
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout 2
uses: actions/checkout@v3
with:
token: ${{ secrets.MY_PAT }}
repository: repo-2
ref: 'main'
path: 'path-1'
- name: Checkout 3
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: repo-2
ref: "master"
path: "path-2"
Error:
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
remote: Repository not found.
Error: fatal: repository 'https://github.com/xxxxxx/' not found
The process '/usr/bin/git' failed with exit code 128
Waiting 11 seconds before trying again
Metadata
Metadata
Assignees
Labels
No labels