Skip to content

Possible answer to private repository support #5

Description

@S0AndS0
  • Handle submodules referring to private repos (ssh?)

If I remember correctly the GITHUB_TOKEN lacks permissions for private repositories.

Not all is lost though, checking the permissions of repo ("Full control of private repositories") when generating a new token at https://github.com/settings/tokens/new, and then overwriting the environment variable within Workflows that require more permissions should to the trick...

uses: domdere/git-submodule-action@master
env:
  GITHUB_TOKEN: ${{ secrets.ALL_REPOS_TOKEN }}

Note, above assumes that https://github.com/<maintainer>/<repository>/settings/secrets has been setup with a secret named ALL_REPOS_TOKEN containing the token generated from prompts followed at the previous link.

... SSH setup should only be required if those utilizing submodules are also using SSH URLs; in my experience GitHub automation doesn't support SSH URLs and their documentation, if I remember correctly, recommends HTTPS instead; even for their own domain.


Small aside; I think if line 37 entrypoint were...

git submodule update --init --merge --recursive --remote

... it may eliminate the need for lines 38 through 40, though that may also download more than what's necessary to update the .gitmodules file and directory-links.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions