Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WilliamRaia-ploomes opened this issue Feb 13, 2025 · 1 comment
Open

Comments

@WilliamRaia-ploomes
Copy link

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?

@WilliamRaia-ploomes
Copy link
Author

Got it to work with a Classic Personal Access Token instead of a Fine-grained one but this is more of a workaround than a fix really, I don't like the idea of a workflow that will be used by my whole company to depend on my own PAT. Why isn't the GITHUB_TOKEN enough for this functionality even with express permission?

@WilliamRaia-ploomes WilliamRaia-ploomes changed the title Submodules checkout repository not found Submodules checkout "repository not found" error without PAT Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant