Skip to content

Commit

Permalink
testsuite.yml - fix git breakage from fix for CVE-2022-24765
Browse files Browse the repository at this point in the history
We need to configure git to know that our working directory is "safe".

This fixes this bug on github:

    Run git remote set-url origin "***[github.com/$GITHUB_REPOSITORY](http://github.com/$GITHUB_REPOSITORY)"
    fatal: unsafe repository ('/__w/perl5/perl5' is owned by someone else)
    To add an exception for this directory, call:

    git config --global --add safe.directory /__w/perl5/perl5
    Process completed with exit code 128.

See the git mailing list for more details on this CVE.
  • Loading branch information
demerphq committed Apr 13, 2022
1 parent e1cb5e9 commit 2323e2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ jobs:
# actions/checkout@v2 doesn't work in a container, so we use v1.
- uses: actions/checkout@v1
- name: fix git remote credential
run: git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
run: |
git config --global --add safe.directory /__w/perl5/perl5
git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
- name: git cfg + fetch tags
run: |
git config diff.renameLimit 999999
Expand Down

0 comments on commit 2323e2d

Please sign in to comment.