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

install-git.sh unattended install fails #11215

Open
6 of 15 tasks
Layer8Err opened this issue Dec 17, 2024 · 3 comments
Open
6 of 15 tasks

install-git.sh unattended install fails #11215

Layer8Err opened this issue Dec 17, 2024 · 3 comments

Comments

@Layer8Err
Copy link

Description

When running install-git.sh in a headless session, a prompt is shown that requires user interaction in order to continue.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Current main branch

Is it regression?

no

Expected behavior

Git setup should be unattended

Actual behavior

There is no -y flag in install-git.sh to remove the source repo. This causes a prompt to be shown and the install does not continue.

Repro steps

Run images/ubuntu/scripts/build/install-git.sh the script halts on line #27.

Problematic line:

add-apt-repository --remove $GIT_REPO

Proposed solution:

add-apt-repository --remove $GIT_REPO -y
@vidyasagarnimmagaddi
Copy link
Contributor

Hi @Layer8Err , Thank you for bringing this issue to our attention. We are looking into this issue and will update you on this issue after investigating.

@subir0071
Copy link
Contributor

Hi @Layer8Err - Could you please provide more information regarding this issue?
Our internal image generation CI pipelines are executing without any issue.

@Layer8Err
Copy link
Author

While running as a user with root access on Ubuntu:

cd /runner-images/images/ubuntu/scripts/build
sudo bash ./install-git.sh

When the script reaches line 27 to run the following command:

add-apt-repository --remove $GIT_REPO

The following output is shown:

root@lp-35539:/home/ubuntu# add-apt-repository --remove $GIT_REPO
PPA publishes dbgsym, you may need to include 'main/debug' component
Repository: 'Types: deb
URIs: https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/
Suites: noble
Components: main
'
Description:
The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Removing repository.
Press [ENTER] to continue or Ctrl-c to cancel.

The process hangs until user input is provided. Setting export DEBIAN_FRONTEND=noninteractive has no effect and the script still hangs. Adding the -y flag prevents this script from being stuck waiting for user input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants