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

GitHub jobs failing due to permissions error #2399

Closed
joeytakeda opened this issue Mar 11, 2023 · 2 comments
Closed

GitHub jobs failing due to permissions error #2399

joeytakeda opened this issue Mar 11, 2023 · 2 comments

Comments

@joeytakeda
Copy link
Contributor

In GitHub, the test job fail when running the Tests from the Stylesheets repo due to a permissions error:

https://github.com/TEIC/TEI/actions/runs/4224874009/jobs/7336394765#step:6:72

From what I can tell, this is a fairly widespread issue for containers running in GitHub runners due to a recent debian security upgrade (see threads here: actions/runner-images#6775 and actions/checkout#1169)

Following the advice from actions/checkout#1169, I think marking the directory as safe in Git after the checkout step would work to solve the issue until actions/checkout implements a fix:

      - name: Checkout Stylesheets repo
        uses: actions/checkout@v3
        with:
          repository: TEIC/Stylesheets
          ref: dev
          path: Stylesheets
      - name: Fix permissions
         run: git config --system --add safe.directory /github/workspace
@joeytakeda joeytakeda changed the title GitHub jobs failing due to permissions error in GitHub actions GitHub jobs failing due to permissions error Mar 11, 2023
@ebeshero ebeshero added this to the Guidelines 4.6.0 milestone Mar 11, 2023
@ebeshero
Copy link
Member

ebeshero commented Mar 12, 2023

@joeytakeda I confirm I'm seeing this exact problem on a new branch I just pushed: https://github.com/TEIC/TEI/actions/runs/4395340700/jobs/7697064380

@joeytakeda
Copy link
Contributor Author

Have now sent up a fix in branch iss2399_gh_test. My proposed fix above did not work, but (go figure!) the suggested one from git did (and of course the /github/workspace one wouldn't have since the working directory mounted in Docker is /__w/ in the action).

One interesting thing here is that the generate specList workflow should have the same issue, but it hasn't been a problem yet since it's using actions/checkout@v2 and not @v3. It should be @v3, though, since @v2 uses a deprecated version of node (12).

joeytakeda added a commit that referenced this issue Mar 12, 2023
* Upgrade action/checkout to v3
* Add permissions config to resolve 'dubious permissions' error
* Add names and spaces to the yaml (to align with test.yml)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants