Skip to content

Submodules checkout "repository not found" error without PAT #2080

Open
@WilliamRaia-ploomes

Description

@WilliamRaia-ploomes

I'm trying to use this action to checkout a private repo which has multiple other private repos as submodules, they're all from the same github organization. All the submodules work fine when interacting with them locally or through github UI. The problem is when running the workflow on github actions after registering all submodules to their paths when it tries to start to clone them it returns "remote: Repository not found." for every submodule we have.

Searching for this problem I've found people saying to use a PAT from a user like in the commented line below, even though that is definitely something I'd like to avoid for a company solution I've tried it and this results in failing to checkout to the primary repo with the error "remote: Write access to repository not granted." even though I'm an admin in the organization, have access to all the repos in it and have given the PAT all read and write repository permissions.

Used config for job:

  unit-tests:
    needs: check-branch
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          # token: ${{ secrets.PIPELINE_PAT }}
          submodules: 'recursive'
          # persist-credentials: false

Tried to give explicit permission for the workflow to read repos but same error.
Tried to use the "persist-credentials: false" and "true" options but same error as without it.
Already checked .gitmodules and all the repos are using correct HTTPS URLs in the format:

[submodule "packages/test"]
	path = packages/test
	url = https://github.com/Org/Test.git

What am I missing here?

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