brew update提示fatal: could not read Username

今天在mac上面使用brew update升级的时候出现如下错误

brew update
提示如下错误
git: 'credential-osxkeychain' is not a git command. See 'git --help'.
fatal: could not read Username for 'https://github.com': terminal prompts disabled

解决办法

brew tap
提示如下
Updating Homebrew...
######################################################################## 100.0%
==> Pouring portable-ruby-2.6.3_1.yosemite.bottle.tar.gz
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (or will be during this `brew` run).

==> Auto-updated Homebrew!
Updated 1 tap (homebrew/services).
No changes to formulae.

homebrew/core
homebrew/dupes
homebrew/php
homebrew/services
brew untap homebrew/homebrew-dupes
提示如下:
Untapping homebrew/dupes...
brew update