From e57a1c831ebc087ffdaaecdfe742a0133a7595b8 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Tue, 5 Jul 2022 14:58:10 -0700 Subject: [PATCH] build: Mark git repos as safe for build This is not an issue when the build is run as non-privilged user. Marking these as safe in case where the build may be run as root or some other user. Signed-off-by: Archana Shinde --- .../packaging/static-build/cloud-hypervisor/build-static-clh.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh b/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh index 82ad3b42b9..8cb1a6e79f 100755 --- a/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh +++ b/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh @@ -56,6 +56,7 @@ build_clh_from_source() { repo_dir="${repo_dir//.git}" rm -rf "${repo_dir}" git clone "${cloud_hypervisor_repo}" + git config --global --add safe.directory "$PWD/repo_dir" pushd "${repo_dir}" if [ -n "${cloud_hypervisor_pr}" ]; then