Can't update Homebrew tap
chrisfinazzo opened this issue · comments
This has happened twice over the past day or so when running brew update
. Checking assumptions with brew doctor
reports nothing. How should I proceed?
% brew update
fatal: couldn't find remote ref refs/heads/master
Error: Fetching /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart failed!
The following taps can not read their remote branches:
dart-lang/dart
This is happening because the remote branch was renamed or deleted.
Reset taps to point to the correct remote branches by running `brew tap --repair`
% brew tap --repair
fatal: couldn't find remote ref refs/heads/master
Error: Failure while executing; `git -C /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart fetch origin` exited with 128.
I experienced the same errors.
I ran
brew untap dart-lang/dart
brew tap dart-lang/dart
That seems like it resolved the issue for me.
YMMV, at the time I didn't have any dart SDKs installed via the tap -- I'd switched to asdf for managing my dart & flutter sdks. I'm not sure if running 'untap' will fail if you've installed things through the tap.
brew tap --repair
worked for me
I experienced the same errors.
I ran
brew untap dart-lang/dart brew tap dart-lang/dartThat seems like it resolved the issue for me.
YMMV, at the time I didn't have any dart SDKs installed via the tap -- I'd switched to asdf for managing my dart & flutter sdks. I'm not sure if running 'untap' will fail if you've installed things through the tap.
I ended up uninstalling dart
, untapping, and adding the tap again. After that, brew doctor
sails through and brew update
reports no errors.
Who knows if it will pop up again the next time there's an update, but we're good for now.
Did the repo change from using master
to main
recently?
yes, I ran brew tap --repair
and got the following!
dart-lang/dart: changed default branch name from master to main!