gpt4 book ai didi

git - Lion OS - brew 更新返回 "Failure while executing..."

转载 作者:太空狗 更新时间:2023-10-29 13:16:46 24 4
gpt4 key购买 nike

当我设置时,我正在尝试更新我的 brew

brew update

我收到这个错误:

error: Your local changes to the following files would be overwritten by merge:
Library/Formula/imagemagick.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

error: The requested URL returned error: 403 while accessing https://github.com/mxcl/homebrew/info/refs
fatal: HTTP request failed
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

Git 有什么问题?如果这种方式不起作用,如何更新 brew?

最佳答案

这是由 update 代码中的一个旧错误引起的,该错误早已被修复。但是,错误的性质要求您执行以下操作:

cd $(brew --repository)
git reset --hard FETCH_HEAD

如果 brew doctor 仍然提示未提交的修改,也运行此命令:

cd $(brew --repository)    
git clean -fd

关于git - Lion OS - brew 更新返回 "Failure while executing...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16018196/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com