最近更新HomeBrew
的时候,一直报错,如下:
1 2 |
$ brew update fatal: could not read Username for 'https://github.com': terminal prompts disabled |
执行
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
$ git config --global --add url."git@github.com:".insteadOf "https://github.com/" $ brew update Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Host key verification failed. 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/homebrew/homebrew-cask failed! homebrew/homebrew-science does not exist! Run `brew untap homebrew/homebrew-science` to remove it. Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions failed! Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services failed! |
执行如下命令即可:
1 2 3 4 5 6 7 |
$ brew untap homebrew/homebrew-science $ brew untap homebrew/homebrew-cask-versions $ brew untap homebrew/homebrew-services $ git config --global --remove-section url."git@github.com:" |
参考链接
Git Error: Could could not read Username for 'https://github.com': terminal prompts disabled