$ brew install pod

Updating Homebrew...

 

 

 

fatal: bad revision 'HEAD'

fatal: bad revision 'HEAD'

fatal: Needed a single revision

You do not have the initial commit yet

Error: Could not 'git stash' in /usr/local/Homebrew!

Please stash/commit manually if you need to keep your changes or, if not, run:

  cd /usr/local/Homebrew

  git reset --hard origin/master

Error: No available formula with the name "pod" 

==> Searching for a previously deleted formula (in the last month)...

Warning: homebrew/core is shallow clone. To get complete history run:

  git -C "$(brew --repo homebrew/core)" fetch --unshallow

 

Error: No previously deleted formula found.

==> Searching for similarly named formulae...

These similarly named formulae were found:

cocoapods            pod2man              podiff               podman               podofo

To install one of them, run (for example):

  brew install cocoapods

==> Searching taps...

==> Searching taps on GitHub...

Error: Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope!

Scopes they need: none

Scopes it has: 

Create a new personal access token: https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew

and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method instead.

Warning: Error searching on GitHub: GitHub {

  "message": "Bad credentials",

  "documentation_url": "https://docs.github.com/rest"

}

 

HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check:

https://github.com/settings/tokens

 

Error: No formulae found in taps.

================================================

打开这个页面

https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew

设置token过期时间

 

Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope!_github

echo "export HOMEBREW_GITHUB_API_TOKEN=复制的token" >> ~/.bash_profile
source ~/.bash_profile
cd /usr/local/Homebrew/
git reset --hard origin/master
cd -

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
brew update

Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope!_github_02

brew install cocoapods