Closed iapicca closed 1 year ago
Running brew tap --repair dart-lang/dart
should resolve:
$ brew tap --repair dart-lang/dart
remote: Enumerating objects: 54, done.
remote: Counting objects: 100% (54/54), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 54 (delta 23), reused 49 (delta 22), pack-reused 0
Unpacking objects: 100% (54/54), 14.03 KiB | 251.00 KiB/s, done.
From https://github.com/dart-lang/homebrew-dart
* [new branch] main -> origin/main
==> dart-lang/dart: changed default branch name from master to main!
After which brew update && brew upgrade dart
works.
brew tap --repair dart-lang/dart
it does fix the issue thanks @miketheman
FYI repair haven't solved that issue for me.
❯ brew tap --repair dart-lang/dart
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 found that post and tried:
cd /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart
git branch -m master main
git remote remove origin
git remote add origin https://github.com/dart-lang/homebrew-dart
After that, brew update
still failed, but this time brew tap --repair dart-lang/dart
solved it.
here we go again
➜ ~ brew tap --repair dart-lang/dart
➜ ~ brew update && \
brew upgrade && \
brew upgrade --cask && \
brew cleanup && \
softwareupdate --all --install --force
Already up-to-date.
==> Upgrading 1 outdated package:
dart-lang/dart/dart 2.19.0 -> 2.19.1
==> Fetching dart-lang/dart/dart
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release/2.19.1/sdk/dartsdk-macos-arm64-release.
curl: (22) The requested URL returned error: 403
Error: dart: Failed to download resource "dart"
Download failed: https://storage.googleapis.com/dart-archive/channels/stable/release/2.19.1/sdk/dartsdk-macos-arm64-release.zip
➜ ~ brew tap --repair dart-lang/dart
➜ ~ brew update
Already up-to-date.
is there a way to permanently fix this?
The last failure, a failure to download the SDK zip file, seems unrelated to the above problems changing master to main.
Could this be a temporary failure? The file is there, and the download of it using curl should succeed.
What really worked for me to fix this issue:
cd /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart
git branch -m master main
git remote remove origin
git remote add origin https://github.com/dart-lang/homebrew-dart
brew tap --repair dart-lang/dart
brew update
Any idea how to fix this so everyone in the wild has a transparent solution?
This issue happens because the "master" branch was renamed to "main" and brew
is totally dependent on git
.
This is a SEVERE error, BTW.
@whesse @kevmoo
FYI repair haven't solved that issue for me.
❯ brew tap --repair dart-lang/dart 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 found that post and tried:
cd /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart git branch -m master main git remote remove origin git remote add origin https://github.com/dart-lang/homebrew-dart
After that,
brew update
still failed, but this timebrew tap --repair dart-lang/dart
solved it.
Thanks! This fixes the problem I was having as the other proposed solutions were not able to. 🙏
brew is completely broken due to the rename of master to main
AD is now at b0e349efe Merge pull request #15081 from reitermarkus/livecheck-artifacts
fatal: couldn't find remote ref refs/heads/master
Error: Fetching /opt/homebrew/Library/Taps/dart-lang/homebrew-dart failed!
Updated 2 taps (homebrew/core and homebrew/cask).
Error: Some taps failed to update!
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
Failed during: /opt/homebrew/bin/brew update --force --quiet
There are no brew commands available. Fixes suggesting brew doctor brew update brew *
are not workable
What really worked for me to fix this issue:
cd /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart git branch -m master main git remote remove origin git remote add origin https://github.com/dart-lang/homebrew-dart brew tap --repair dart-lang/dart brew update
For now this is the fix
Assuming that users have used the workaround described here. If you're still facing issues, please report them to the homebrew team.
brew is completely broken due to the rename of master to main
AD is now at b0e349efe Merge pull request #15081 from reitermarkus/livecheck-artifacts fatal: couldn't find remote ref refs/heads/master Error: Fetching /opt/homebrew/Library/Taps/dart-lang/homebrew-dart failed! Updated 2 taps (homebrew/core and homebrew/cask). Error: Some taps failed to update! 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
Failed during: /opt/homebrew/bin/brew update --force --quietThere are no brew commands available. Fixes suggesting brew doctor brew update brew *
are not workable
This also effects new installs of brew I needed to:
cd /opt/Homebrew/Library/Taps/dart-lang/homebrew-dart
git fetch
git checkout main
git checkout -b master
then I was able to execute
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@athomas – thoughts?
The problem has not been fully fixed for 6 months (and this issue is closed for 5 months, BTW)
This also effects new installs of brew
I created a new GitHub Actions workflow and it installs fine using the official instructions from dart.dev: https://github.com/dart-lang/homebrew-dart/actions/runs/5553515999/jobs/10142152664
Anything I'm missing? Perhaps you had an old cache?
this happens since flutter forward