I am running a SonarCloud Scan on a C++ private GitHub repo which contains private submodules from the same organization
My workflow file /.github/workflows/build.yml is:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
env:
SONAR_SCANNER_VERSION: 4.6.1.2450 #4.4.0.2170
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
...
My submodules file .gitmodules
:
[submodule "external/project1"]
path = external/project1
url = https://github.com/organization/project1
When running the workflow, I get the following error:
Cloning into '/home/runner/work/repo/external/project1'...
fatal: could not read Username for 'https://github.com': No such device or address
fatal: clone of 'https://github.com/organization/project1' into submodule path '/home/runner/work/repo/external/project1' failed
Failed to clone 'external/project1'. Retry scheduled
I tried out different configurations form Checkout submodules · Actions · GitHub Marketplace · GitHub but I still have the error.
Any help? Thanks.