Skip to content

Commit

Permalink
Cirrus: Fix git config permission denied
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cevich committed Feb 28, 2023
1 parent 4b93662 commit 6babef5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/buildah-bud/run-buildah-bud-tests
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
$_gc user.name "Testy McTestface"
$_gc --add safe.directory $buildah_dir
)
fi

cd $buildah_dir
Expand Down

0 comments on commit 6babef5

Please sign in to comment.