homebrew-cask: cloning is broken
Verification
- I understand that if I ignore these instructions, my issue may be closed without review.
- I have retried my command with
--force. - I ran
brew update-reset && brew updateand retried my command. - I ran
brew doctor, fixed as many issues as possible and retried my command. - I have checked the instructions for reporting bugs.
- I made doubly sure this is not a checksum does not match error.
Description of issue
~# git clone https://github.com/homebrew/homebrew-cask
Cloning into 'homebrew-cask'...
remote: Enumerating objects: 751118, done.
remote: Counting objects: 100% (39001/39001), done.
remote: fatal: object 8b16853610463e75881196394236c34e02d21c52 cannot be read
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
~#
Command that failed
git clone https://github.com/homebrew/homebrew-cask
Output of command with --verbose --debug
no
Output of brew doctor and brew config
no doctor
Output of brew tap
no
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 15
- Comments: 19 (10 by maintainers)
Commits related to this issue
- unset HOMEBREW_NO_INSTALL_FROM_API See https://github.com/Homebrew/homebrew-cask/issues/150323#issuecomment-1619263644 — committed to Fsu0413/openssl-externalCMake by Fsu0413 a year ago
- unset HOMEBREW_NO_INSTALL_FROM_API See https://github.com/Homebrew/homebrew-cask/issues/150323#issuecomment-1619263644 — committed to Fsu0413/openssl-externalCMake by Fsu0413 a year ago
- unset HOMEBREW_NO_INSTALL_FROM_API See https://github.com/Homebrew/homebrew-cask/issues/150323#issuecomment-1619263644 — committed to Fsu0413/openssl-externalCMake by Fsu0413 a year ago
- GitHub Action Hack MacOS has an issue with homebrew. More info https://github.com/Homebrew/homebrew-cask/issues/150323#issuecomment-1619263644 — committed to foldynl/QLog by foldynl a year ago
- Attempt to workaround homebrew-cask fetch failure. See: https://github.com/Homebrew/homebrew-cask/issues/150323. — committed to adyang/dotfiles by adyang a year ago
- workflow: workaround homebrew issue see https://github.com/Homebrew/homebrew-cask/issues/150323 — committed to HurricanGame/Hurrican by drfiemost a year ago
- chore(ci): Set HOMEBREW_NO_INSTALL_FROM_API in CI We seem to be hitting https://github.com/Homebrew/homebrew-cask/issues/150323 which recommends this workaround. Signed-off-by: Jesse Szwedko <jesse.... — committed to vectordotdev/vector by jszwedko a year ago
- Workaround broken 'brew update' See: https://github.com/actions/runner-images/issues/7855 https://github.com/Homebrew/homebrew-cask/issues/150323 — committed to lsh123/xmlsec by lsh123 a year ago
- chore(ci): Set HOMEBREW_NO_INSTALL_FROM_API in CI (#17867) We seem to be hitting https://github.com/Homebrew/homebrew-cask/issues/150323 which recommends this workaround. Signed-off-by: Jesse Szwedk... — committed to vectordotdev/vector by jszwedko a year ago
- Workaround broken 'brew update' (#689) * Workaround broken 'brew update' See: https://github.com/actions/runner-images/issues/7855 https://github.com/Homebrew/homebrew-cask/issues/150323 — committed to lsh123/xmlsec by lsh123 a year ago
- Workaround broken 'brew update' (#689) * Workaround broken 'brew update' See: https://github.com/actions/runner-images/issues/7855 https://github.com/Homebrew/homebrew-cask/issues/150323 — committed to lsh123/xmlsec by lsh123 a year ago
- chore(ci): Set HOMEBREW_NO_INSTALL_FROM_API in CI (#17867) We seem to be hitting https://github.com/Homebrew/homebrew-cask/issues/150323 which recommends this workaround. Signed-off-by: Jesse Szwedk... — committed to vectordotdev/vector by jszwedko a year ago
- chore(ci): Set HOMEBREW_NO_INSTALL_FROM_API in CI (#17867) We seem to be hitting https://github.com/Homebrew/homebrew-cask/issues/150323 which recommends this workaround. Signed-off-by: Jesse Szwedk... — committed to vectordotdev/vector by jszwedko a year ago
We’re talking to GitHub about this issue and progress is being made.
Just to clarify things here, given somethings have changed since Homebrew 4.0.0:
HOMEBREW_NO_INSTALL_FROM_API(it is not set by default), and are not editing a cask yourself, then you don’t need a homebrew-cask clone. Most instructions referring tobrew tap homebrew/caskare out-of-date.brew updatethen you can safely ignore the error as it does not impact your install as the git clone isn’t used by default. I would suggest even doing abrew untap homebrew/cask- you will still be able to install casks under the new JSON API system introduced in Homebrew 4.0.0.HOMEBREW_NO_INSTALL_FROM_APIis set by default there. If you’re happy unsetting that then you can try that, otherwise the only recommendation I have is tryHomebrew/actions/setup-homebrew@masterwhich retries the operation 5 times (which isn’t always enough but is a little better).GitHub has completed a rollout of a fix, and results so far indicate that the errors have stopped. I’ll continue to monitor over the weekend.
Thanks to the git systems team at GitHub who have worked all week on tracking down and fixing the root cause.
We’ve also asked the GitHub Actions team to make some changes to their images that should eliminate the impact if this issue were to ever happen again. These changes will hopefully be rolled out soon.
On my local copy seems to fix it for me?
Homebrew 4.0.27 contains a change for non-developers that skips homebrew-cask fetching if you don’t have
HOMEBREW_NO_INSTALL_FROM_API. So most users runningbrew updateon their local machine should see the error go away after one morebrew update(which will update the update script for subsequent runs). Again remember that you don’t need to dobrew tap homebrew/caskto install casks anymore under the default configuration.This change does not apply to GitHub Actions as GitHub sets
HOMEBREW_NO_INSTALL_FROM_APIby default. The recommendation there for now continues to be to useHomebrew/actions/setup-homebrew@master(which now has acask: falseoption if you don’t use casks), or unset the env andbrew untap homebrew/core homebrew/cask(note however for this approach that the env may be set again in subsequent steps, which could cause your workflow so become significantly slower if you use brew in subsequent steps).For other CI providers, like CircleCI, I’d like to hear more about your setup. What base image are you using? What commands are you running?
In terms of the fixing the root cause of the underlying git issue, progress has been made with GitHub on this issue and hopefully there will be more to share soon.
Would something like https://github.com/Homebrew/actions/pull/391 help your particular case?
@Groxx I don’t think
git fsckis relevant at all here. If widespread corruption of local copies was actually the issue, cloning from scratch would always resolve the issue and never fail.These cloning errors seem to come and go in waves, occasionally there is a brief time window when all the clone/pull operations succeed. My guess - that’s when traffic gets routed to a non-corrupted replica on github’s side. I don’t think
git fsckdoes anything besides adding a delay, which increases the chances of next git operation landing on a different replica.@Bo98 : thank you! I temporarily unblocked our release pipeline by pinning homebrew/actions version
Homebrew/actions/setup-homebrew@6fef698e5a2d6da69b9b7c76ad7e9a268ae59192, but I definitely wouldn’t recommend that approach to anyone unless they know what they are doing@SMillerDev interesting, it is constantly failing on our CI starting last week with exactly this error 😕