From 4303fd2da3dda68da2954d68ae885ed9fcba1b5b Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Wed, 13 Apr 2022 05:16:04 +0200 Subject: testsuite.yml - fix git breakage from fix for CVE-2022-24765 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. --- .github/workflows/testsuite.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 3e36166432..639a87974e 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -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 -- cgit v1.2.1