From 6babef5983821d238b08947394eb804e43fc8aee Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 28 Feb 2023 10:24:55 -0500 Subject: [PATCH] Cirrus: Fix git config permission denied The buildah bud tests run rootless, so attempting to bypass the ident-check with a `git config --system` fails with a permission denied error (as it should). Update the command to use `--global` instead, which writes to `~/.gitconfig` and so works for regular users. Also setup a fake identity for the CI-user and enable shell-debugging for the commands to inform humans of what is happening in the script. Signed-off-by: Chris Evich --- test/buildah-bud/run-buildah-bud-tests | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/buildah-bud/run-buildah-bud-tests b/test/buildah-bud/run-buildah-bud-tests index 35866b487d..35dd3ae88f 100755 --- a/test/buildah-bud/run-buildah-bud-tests +++ b/test/buildah-bud/run-buildah-bud-tests @@ -155,7 +155,13 @@ if [[ -n $do_checkout ]]; then # under automation, nobody cares about this condition or message, because # the environment is disposable. if [[ "$CI" == "true" ]]; then - git config --system --add safe.directory $buildah_dir + ( + _gc='git config --global' + set -x + $_gc user.email "TMcTestFace@example.com" + $_gc user.name "Testy McTestface" + $_gc --add safe.directory $buildah_dir + ) fi cd $buildah_dir