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

/usr/bin/git fetch --quiet --force origin step in line 936 can often fail #890

Closed
1 of 2 tasks
fiftydinar opened this issue Oct 30, 2024 · 1 comment
Closed
1 of 2 tasks

Comments

@fiftydinar
Copy link

fiftydinar commented Oct 30, 2024

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • your problem was from running the official install or uninstall script?
  • after installation: ran brew config and brew doctor and included their output with your issue? If you couldn't install: provided your OS version with the output of your issue?

What you were trying to do (and why)

To successfully install Homebrew in Secureblue custom image based on Fedora Atomic.
https://github.com/secureblue/secureblue

What happened (include command output)

Secureblue utilizes GitHub Actions to build around 60 variants of custom OS images daily.
In all of them, Homebrew install is specified.

While most builds succeed, it can easily happen that some builds don't succeed due to Homebrew installer failure.
You can look at history of Secureblue's GitHub Actions to note this:
https://github.com/secureblue/secureblue/actions

Error command output is consistent & it shows this:

Command output

[21:13:45 g.i/s/kinoite-nvidia-open-userns-hardened:latest] => ==> Downloading and installing Homebrew...
[21:14:06 g.i/s/kinoite-nvidia-open-userns-hardened:latest] => error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
[21:14:06 g.i/s/kinoite-nvidia-open-userns-hardened:latest] => error: 400 bytes of body are still expected
[21:14:06 g.i/s/kinoite-nvidia-open-userns-hardened:latest] => fetch-pack: unexpected disconnect while reading sideband packet
[21:14:06 g.i/s/kinoite-nvidia-open-userns-hardened:latest] => fatal: early EOF
[21:14:06 g.i/s/kinoite-nvidia-open-userns-hardened:latest] => fatal: fetch-pack: invalid index-pack output
[21:14:06 g.i/s/kinoite-nvidia-open-userns-hardened:latest] => Failed during: /usr/bin/git fetch --quiet --force origin

/usr/bin/git fetch --quiet --force origin step in line 936 of the script is where this error happens.
Why it happens there?

No idea.

execute "${USABLE_GIT}" "fetch" "${quiet_progress[@]}" "--force" "origin"

What you expected to happen

For the script to proceed further & for install to be successful.

Step-by-step reproduction instructions (by running brew commands)

  1. Just running the install script inside GitHub Actions to install HomeBrew to a Linux distribution/image, until you get the failure.

BlueBuild can be used to easily set this up for testing:
https://blue-build.org
https://blue-build.org/how-to/setup/#automatic-setup-using-the-bluebuild-workshop
https://blue-build.org/reference/modules/brew/

This would match our environment where this is happening.

Alternatively, you may try to run the install script many times on booted system until it fails?

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

I didn't tick the 2nd checkmark, because the failure happened during the install, not afterwards.

Possible action to take to solve this issue

Implementation of reset for the prone-to-fail function I outlined in the issue?

Maybe this can also help?
https://stackoverflow.com/questions/70303947/error-installing-homebrew-unexpected-disconnect-while-reading-sideband-packet/70310403#70310403

@MikeMcQuaid
Copy link
Member

/usr/bin/git fetch --quiet --force origin step in line 936 of the script is where this error happens. Why it happens there?

No idea.

Because you lost your connection to GitHub. Nothing we (Homebrew) can really do about this, you'll need to ask GitHub.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants