自制安装:在以下过程中失败:git fetch origin master:refs/remotes/origin/master -n --depth = 1 [英] Homebrew install: Failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1
问题描述
我在终端机(Mac El Capitan)上运行了以下命令
I ran the following command on terminal (Mac El Capitan)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
,并收到以下错误消息:
and got the following error message:
Failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1
其他尝试:
sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
然后是上面的两个命令.
then the two commands above.
有人知道如何安装Homebrew吗?
Any idea how to install Homebrew?
brew无法识别
和 ruby版本2.0.0
, git版本2.7.4
推荐答案
经过数小时的研究和蛮力,我了解到该问题是由于git的配置不正确造成的.一些文章建议降级您的git或一起重新安装.但是,我仅通过添加以下内容就解决了该问题
After a few hours of research and brute force I learned the issue was due to git not being configured properly. Some articles suggested downgrading your git or reinstalling all together. However, I resolved the issue just by adding the following
git config --global user.email yourgitemail@example.com
然后从/usr/local
中删除地窖
和 homebrew
目录,然后重试安装.
Then remove the cellar
and homebrew
directories from /usr/local
and re-try the installation.
这篇关于自制安装:在以下过程中失败:git fetch origin master:refs/remotes/origin/master -n --depth = 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!