homebrew-fb
homebrew-fb copied to clipboard
Branch rename broke the tap - "Error: Fetching /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb failed!"
Not sure you can do anything about this but an FYI in case others come looking:
brew update
started responding with Error: Fetching /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb failed!
recently.
I believe this is down to the fact that it was trying to pull from the existing branch named master
and that no longer exists, it's now called main
.
brew update-reset
fixes this:
==> Fetching /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb...
From https://github.com/facebook/homebrew-fb
- [deleted] (none) -> origin/automated_fixup_code_of_conduct_file_exists
- [deleted] (none) -> origin/automated_fixup_contributing_file_exists
- [deleted] (none) -> origin/master
(refs/remotes/origin/HEAD has become dangling)
* [new branch] main -> origin/main
Note: this will destroy all your uncommitted or committed changes to local homebrew repositories (Shouldn't be an issue unless you author formula updates, etc)
This shouldn't affect new users of the tap since I assume it'd pickup branch main
from the outset.
same error to me
brew tap --repair
also seems to help. It's suggested by brew on update.
nope, brew tap --repair
not work for me.
> brew tap --repair
fatal: couldn't find remote ref refs/heads/master
Error: Failure while executing; `git -C /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb fetch origin` exited with 128.
I had to update branch and recreate remote myself, from the tap directory:
cd /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb
git branch -m master main
git remote remove origin
git remote add origin https://github.com/facebook/homebrew-fb.git
only then I could run brew update-reset
and brew update
without errors.