Interesting Wrinkle with Homebrew and git
This morning I was working to upgrade my laptop from Postgres 10.3 to 11.1, and I did the following, as part of the upgrade:
$ brew update fatal: could not read Username for 'https://github.com': terminal prompts disabled Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew /homebrew-boneyard failed!
I did a lot of googling, and came up with a couple of ideas. This was from GitHub:
$ git config --global credential.helper osxkeychain
but that didn't work. Then I found another reference saying that the 2FA on GitHub was the problem, and that you needed to bypass that with:
$ git config --global --add url."git@github.com:".insteadOf "https://github.com/"
and still that didn't work. So I took a different approach, I started looking at the Homebrew files on my laptop - specifically, the boneyard mentioned in the error. Turns out... if you looked at the .git/config file in that directory, it points to a directory in GitHub that no longer exists! OK... this might be something.
So I removed the nearly empty directory, and tried again:
$ brew update Already up-to-date.
Success! It wasn't the config of git - it was that Homebrew was trying to update something that no longer existed. Lesson learned.