Skip to content

Submodule cloning: Needed a single revision #418

Open
@Flusinerd

Description

@Flusinerd

Problem:
Pipeline failing to clone submodule.
image

Environment:
Both the main repository and submodule are private repositories belonging to the same organisation. I am the owner of the organisation and I have created a PAT with full repo access. This PAT is then added as secret the the main repository.

Pipeline Config:

build:

    runs-on: self-hosted

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x, 15.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
        token: ${{ secrets.CI_PAT }}
        submodules: true
        persist-credentials: true
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run build --if-present
    - run: npm test

.gitmodules:

[submodule "src/shared"]
	path = src/shared
	url = https://github.com/<org>/<sub-module-repo>.git
	branch = main

If I omit the branch it does not work either.

Self-Hosted:
I am running the pipelines on two of our servers. Both have docker installed and I dont have issues with any other repository that does not include any submodules.
They are both running latest ubtunu 20.04 LTS on x64.
Latest git version has been installed using apt install git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions