[Ubuntu] Add safe directory setting to git config (#5420)

* Add safe directory setting to git config

* Change git config file to /etc/gitconfig
This commit is contained in:
Mikhail Timofeev
2022-04-21 02:15:17 +04:00
committed by GitHub
parent 961aac86a3
commit 1e6e5cf82e

View File

@@ -15,6 +15,11 @@ add-apt-repository $GIT_REPO -y
apt-get update
apt-get install git -y
git --version
# Git version 2.35.2 introduces security fix that breaks action\checkout https://github.com/actions/checkout/issues/760
cat <<EOF >> /etc/gitconfig
[safe]
directory = *
EOF
# Install git-lfs
curl -s $GIT_LFS_REPO/script.deb.sh | bash