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

Branch rename broke the tap - "Error: Fetching /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb failed!" #63

Open
liamjones opened this issue Aug 13, 2021 · 4 comments

Comments

@liamjones
Copy link

liamjones commented Aug 13, 2021

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.

@faimin
Copy link

faimin commented Aug 17, 2021

same error to me

@KapJI
Copy link
Member

KapJI commented Aug 23, 2021

brew tap --repair also seems to help. It's suggested by brew on update.

@faimin
Copy link

faimin commented Aug 26, 2021

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.

@rdamborsky
Copy link

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.

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

4 participants