如何在Mac上安装Google Repo

4
我两周前刚换了一台新的Mac电脑。我试图安装谷歌Repo。
虽然我不懂安卓开发,但我的公司使用这个Repo来存储代码库。
我是否仍需要执行“建立构建环境”选项卡中的所有说明?它要求创建一个分区等。
另外,在将repo下载到~/bin/repo之后,我应该怎么做?我的意思是如何安装该文件。网站已经给出了几个SHA密钥,但我不知道如何使用它们。
感谢任何帮助。

https://help.github.com/articles/fork-a-repo/ 是一个很好的起点。仔细阅读它:里面有关于如何使用SHA密钥等链接。 - Nathaniel Ford
3个回答

9

我更喜欢使用brew

brew install repo

这个回答怎么没有解释如何在MacOS上安装repo呢?这应该是被采纳的答案,因为它可行且是最简单的方式。 - marchinram
这个解决方案有效! - Natan Lotério
这个解决方案有效! - undefined

2

您已经安装了 git(作为 OSX 的一部分)

  • Open terminal
  • got to the desired directory
  • clone the project: Get a local copy of the repo repository with this command from either mirror location:

    git clone https://android.googlesource.com/tools/repo
    # OR:
    git clone https://gerrit.googlesource.com/git-repo
    
在将repo下载到~/bin/repo之后,您应该怎么做呢?我的意思是如何安装那个文件。网站提供了几个SHA密钥,但我不知道如何使用它们。请按照以下说明操作:http://source.android.com/source/downloading.html#installing-repo
这些SHA-1是什么意思?
For version 1.17, the SHA-1 checksum for repo is ddd79b6d5a7807e911b524cb223bc3544b661c28
For version 1.19, the SHA-1 checksum for repo is 92cbad8c880f697b58ed83e348d06619f8098e6c
For version 1.20, the SHA-1 checksum for repo is e197cb48ff4ddda4d11f23940d316e323b29671c
For version 1.21, the SHA-1 checksum for repo is b8bd1804f432ecf1bab730949c82b93b0fc5fede
For version 1.22, the SHA-1 checksum for repo is da0514e484f74648a890c0467d61ca415379f791

根据您的版本,您需要检出以下SHA-1。


如何操作?

在此处阅读有关检出部分的内容并进行操作:
如何将HEAD移回先前位置?(分离的Head)


0
这个网站提供了一些 SHA 密钥,但我不知道如何使用它们。
SHA-1 密钥用于验证代码库下载。
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ openssl sha1 ~/bin/repo
SHA1(~/bin/repo)= da0514e484f74648a890c0467d61ca415379f791

http://source.android.com/source/downloading.html#installing-repo下载

对于版本1.22,repo的SHA-1校验和为da0514e484f74648a890c0467d61ca415379f791


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