如何在Mac OS X 10.8(山狮)中更改Homebrew的git源远程位置?

14

在按照这些说明设置我的Mac OS X 10.8 Mountain Lion环境后,我在安装Homebrew并在shell中运行brew doctor时遇到了问题。

    Warning: Suspicious git origin remote found.

    With a non-standard origin, Homebrew won't pull updates from
    the main repository. The current git origin is:

    Unless you have compelling reasons, consider setting the
    origin remote to point at the main repository, located at:
    https://github.com/mxcl/homebrew.git

如何更改 git 的远程源位置?

3个回答

16
感谢这篇文章,我发现了我的问题。
在安装Homebrew时,它似乎没有拉取最新版本。安装后,请运行brew update。Homebrew更近期修复了后续发布中的“起源问题”,更新安装后会反映出来。

3
对这个解决方案的一个小评论:今天安装homebrew后,我也收到了同样的警告。然而运行 brew update 命令告诉我homebrew已经是最新的版本了。在我能使用 brew update 命令并移除这个警告之前,我必须重新启动我的机器(关闭终端不够)。 - Dyrborg
1
"brew update" 对我造成了问题,但重新启动终端解决了它。 - Grault

0

我刚刚将我的iMac升级到了10.9.1,然后运行了brew update。之后,brew doctor给了我一个“非标准来源”的警告。@tom-geoco提到的帖子并没有真正说明问题出在哪里,也没有解释如何手动更改“origin remote”设置,但是根据@jesdisciple上面的评论,我只是退出终端,重新打开它,然后尝试运行brew doctor,问题就消失了。brew --config现在报告的是ORIGIN: https://github.com/Homebrew/homebrew.git,这是正确的。很神奇,不是吗?


0

注释:(我没有足够的声望来评论,请添加并删除此内容)

  1. brew update
  2. brew doctor -> 可疑来源错误
  3. 重新启动终端
  4. brew doctor -> 可疑来源错误
  5. brew update
  6. 重新启动终端
  7. brew doctor -> 一切正常。

这就是我的情况。我希望这能帮助其他人。请注意,您必须运行 brew update 两次 才能摆脱它。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接