Upgrading Homebrew and avoiding the failed to verify attestation error#
I managed to get my Homebrew installation back into shape today. The first problem I was having is that it complained that macOS Sequoia was unsupported:
1Warning: You are using macOS 15.2We do not provide support for this pre-release version.
It turns out I was on an older Homebrew version. Sequoia support was added in Homebrew 4.4.0 released on October 1st 2024.
For some reason brew update
wasn’t fetching that new version. I ended up using this recipe from StackOverflow:
1cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update
Developer mode#
After publishing this I got this tip from Homebrew team member @yossarian:
you’re getting attestations by default probably because you have developer mode enabled; those kind of rate limiting issues are why it isn’t in GA yet
I must have turned developer mode on years ago and forgot about it! Here’s the documentation, which also explains why my brew update
command didn’t work as expected:
When developer mode is enabled,
brew update
will update Homebrew to the latest commit on themaster
branch instead of the latest stable version along with some other behaviour changes
To check the mode run:
1brew developer
I got this:
1Developer mode is enabled.
To turn it off:
1brew developer off
Then confirm:
1brew developer
1Developer mode is disabled.
I believe the challenges I had in this TIL can be explained by developer mode.
Failed to verify attestation#
Homebrew added a feature recently that checks cryptographical “attestations” on downloaded packages. This is implemented via the GitHub gh
command.
My first problem was that I got this error:
1unknown command "attestation" for "gh"
The solution (thanks again, StackOverflow) was to manually upgrade the gh
package first to get the new command:
1brew upgrade gh
Then I ran brew upgrade
to upgrade everything… which didn’t quite work, because I kept running into warnings like this one:
1==> Verifying attestation for ca-certificates2Warning: Failed to verify attestation. Retrying in 1...3Warning: Failed to verify attestation. Retrying in 3...4Warning: Failed to verify attestation. Retrying in 9...5Warning: Failed to verify attestation. Retrying in 27...
I frequently have rate limiting problems with my GitHub account, so my hunch is that these were causing the command to fail.
The fix was to run this instead, using the HOMEBREW_NO_VERIFY_ATTESTATIONS
environment variable to disable attestation checking entirely:
1HOMEBREW_NO_VERIFY_ATTESTATIONS=1 brew upgrade