卸载和安装Homebrew时出现Git错误

时间:2019-05-21 15:49:15

标签: git homebrew

因此,出于某些原因,我使用Ruby命令从计算机上卸载了Homebrew,该命令说“这将卸载Brew附带的所有软件包”。我这样做了,现在当我尝试再次安装Homebrew时,出现Git错误,提示“请确保您具有正确的访问权限”。

我认为此错误是因为卸载Brew卸载了Git,但是当我键入“ git --version”时,我得到了“ git version 2.15.0”,所以这不是问题。

然后,我生成了一个新的SSH密钥,并将公共密钥添加到了我的git帐户。做

ssh -T git@github.com

给我

Hi {{username}}! You've successfully authenticated, but GitHub does not provide shell access

即使我尝试git克隆自己的仓库,我也会遇到相同的错误:

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

这是Brew安装的日志

==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Homebrew
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown rafaykalim /usr/local/Homebrew
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

我还手动删除了/ usr / local / Homebrew。这是卸载Brew的命令:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

编辑:我刚刚从计算机上卸载了git,但仍然遇到相同的错误。不知道发生了什么事!

我使用此脚本卸载了Git: https://gist.github.com/naomik/11245234

0 个答案:

没有答案
相关问题