brew update 時の Permission denied 解決方法 #Sierra

$ brew update
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Permission denied (publickey).
fatal: Could not read from remote repository.

brew update 時に “Permission denied (publickey).” になったので、

$ ssh-add -A

で解決しました。

`brew update` gives lots of "Permission denied (publickey)" git errors · Issue #1185 · Homebrew/brew · GitHub