I have two private GitHub repositories within my organisation (or my user). One of them contains the other as a submodule. How can I clone this other private repository with its containing submodule?
I tried
- uses: actions/checkout@v3
with:
submodules: true
However this failed with an error message on the submodule part, is there some permission I should add or other?
Fetching submodules
/usr/bin/git submodule sync
/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1
Submodule '.github/workflows/MYPROJECT1' (https://github.com/MYUSER/MYPROJECT1.git) registered for path '.github/workflows/MYPROJECT1'
Cloning into '/home/runner/work/MYPROJECT2/MYPROJECT2/.github/workflows/MYPROJECT1'...
remote: Repository not found.
Error: fatal: repository 'https://github.com/MYUSER/MYPROJECT1.git/' not found
Error: fatal: clone of 'https://github.com/MYUSER/MYPROJECT1.git' into submodule path '/home/runner/work/MYPROJECT2/MYPROJECT2/.github/workflows/MYPROJECT1' failed
Failed to clone '.github/workflows/MYPROJECT1'. Retry scheduled
... more errors