fatal: could not read Username for 'https://github.com': terminal prompts disabled

最近更新`HomeBrew`的时候,一直报错,如下:

$ brew update
fatal: could not read Username for 'https://github.com': terminal prompts disabled

执行

$ 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!

执行如下命令即可:

$ 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

发布者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注