macoshomebrewgithub-cli

unknown command "attestation" for "gh"


I was trying to upgrade all Homebrew packages with

brew upgrade

and encountered the following error:

unknown command "attestation" for "gh"

Solution

  • I hadn't updated or upgraded Homebrew in a while. I updated Homebrew first using

    brew update
    

    and then tried to upgrade all packages. It appears brew is using gh attestation now, but the version of gh I had installed did not have this subcommand.

    To fix this, I manually upgraded gh first, and then upgraded all packages:

    brew upgrade gh
    brew upgrade