Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Temp fix: Pin old git version #11600

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Temp fix: Pin old git version
Potential workaround for 2.48 git causing
issue with checkout action.
  • Loading branch information
lawrencegripper committed Feb 14, 2025
commit aa87a5c88388d76f1b00b8283b406aae5c3a5eaf
22 changes: 15 additions & 7 deletions images/ubuntu/scripts/build/install-git.sh
Original file line number Diff line number Diff line change
@@ -7,12 +7,20 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh

GIT_REPO="ppa:git-core/ppa"
# Temporary fix for git version 2.48 breaking change impacting checkout action
# Note: The PPA has removed the 2.47.1 version, even in superseeded packages for Noble and others
# the fallback here is to use the 2.47.1 version from the PPA for an earlier version of Ubuntu
Comment on lines +11 to +12
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git-man (>> 1:2.47.1), git-man (<< 1:2.47.1-.)

wget -O git.deb https://launchpad.net/~git-core/+archive/ubuntu/ppa/+files/git_2.47.1-0ppa1~ubuntu16.04.1_amd64.deb
wget -O git-man.deb https://launchpad.net/~git-core/+archive/ubuntu/ppa/+files/git-man_2.47.1-0ppa1~ubuntu16.04.1_all.deb

## Install git
add-apt-repository $GIT_REPO -y
apt-get update
apt-get install git
apt-get install -y ./git.deb ./git-man.deb

# GIT_REPO="ppa:git-core/ppa"

# ## Install git
# add-apt-repository $GIT_REPO -y
# apt-get update
# apt-get install git=1:2.47.1-*

# Git version 2.35.2 introduces security fix that breaks action\checkout https://github.com/actions/checkout/issues/760
cat <<EOF >> /etc/gitconfig
@@ -24,10 +32,10 @@ EOF
apt-get install git-ftp

# Remove source repo's
add-apt-repository --remove $GIT_REPO
# add-apt-repository --remove $GIT_REPO

# Document apt source repo's
echo "git-core $GIT_REPO" >> $HELPER_SCRIPTS/apt-sources.txt
# echo "git-core $GIT_REPO" >> $HELPER_SCRIPTS/apt-sources.txt

# Add well-known SSH host keys to known_hosts
ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> /etc/ssh/ssh_known_hosts