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

时间:2013-02-23 06:10:45

标签: macos terminal osx-mountain-lion homebrew

在设置我的Mac OS X 10.8 Mountain Lion环境(per these instructions)时,我在安装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 origin远程位置?

3 个答案:

答案 0 :(得分:17)

感谢this post,我发现了我的问题。

安装Homebrew时,它似乎没有拉出最新版本。安装完成后,运行brew update。 Homebrew最近在更新的版本中修复了“Origin issue”,这在更新安装时得到了反映。

答案 1 :(得分: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这是正确的。怪异的呃?

答案 2 :(得分:0)

评论:(我没有足够的声誉发表评论,所以请添加此内容并删除此内容)

  1. brew update
  2. brew doctor - >可疑来源错误
  3. 重启终端
  4. brew doctor - >可疑来源错误
  5. brew update
  6. 重启终端
  7. brew doctor - >一切都好。
  8. 这就是我的样子。我希望这可以帮助其他人。请注意,您必须运行 brew update 两次才能摆脱它。