brew doctor, fixed as many issues as possible and retried your prior step?Unable to use brew update, output:
> 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.
Please make sure you have the correct access rights
and the repository exists.
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.
Please make sure you have the correct access rights
and the repository exists.
Error: Fetching /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes failed!
> brew -v
Homebrew 1.0.5-35-g8608e48
Homebrew/homebrew-core (git revision 227e; last commit 2016-09-22)
brew update --verbose will help you figure out which repositories you need to fix your GitHub access credentials for.
If you've upgrade to macOS Sierra there's a known issue (which seems deliberate on Apple's part) where it no longer reads your SSH passphrase from the Keychain, so every time you reboot you have to manually ssh-add -A if you fetch stuff from Git over SSH, otherwise you will see issues like that.
See https://github.com/jirsbek/SSH-keys-in-macOS-Sierra-keychain and the various sources linked to from there.
@DomT4 ssh-add -A fixed the problem, thanks.
(although, weirdly, git-over-ssh has been working for me this entire time, just not with homebrew)
@gfarrell Same thing here. Only experienced the issue with Homebrew for some reason.
Thanks to @DomT4, ssh-add -A did the job 馃憤
Most helpful comment
If you've upgrade to macOS Sierra there's a known issue (which seems deliberate on Apple's part) where it no longer reads your SSH passphrase from the Keychain, so every time you reboot you have to manually
ssh-add -Aif you fetch stuff from Git over SSH, otherwise you will see issues like that.See https://github.com/jirsbek/SSH-keys-in-macOS-Sierra-keychain and the various sources linked to from there.