4

I just got a new mac like two weeks back. I am trying to install Google Repo

I am not into android development but my company uses this repo to store its codebase.

do I still need to carry out all the instructions from Establishing a Build Environment tab? It asks to create a partition etc.

also after downloading repo into ~/bin/repo what am I supposed to do? I mean how to install that file. The website has given few SHA keys but I don't know how to use them.

Any help would be appreciated.

user1079065
  • 2,085
  • 9
  • 30
  • 53
  • https://help.github.com/articles/fork-a-repo/ is a good place to start. Read through it carefully: there are links to how to use SHA keys, etc. – Nathaniel Ford Mar 17 '16 at 20:09

3 Answers3

9

I prefer to use brew

brew install repo
dckoo
  • 101
  • 1
  • 2
2

You already have git installed (as part os 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
    

also after downloading repo into ~/bin/repo what am I supposed to do?
I mean how to install that file.
The website has given few SHA keys but I don't know how to use them.

Follow those instructions:
http://source.android.com/source/downloading.html#installing-repo


What does those SHA-1 means?

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

Those are the SHA-1 you have to checkout according to your version.


How to it?

Read here about the checkout part and do it:
How to move HEAD back to a previous location? (Detached head)

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167
0

The website has given few SHA keys but I don't know how to use them.

The SHA-1 keys are for verifying the repo download.

$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ openssl sha1 ~/bin/repo
SHA1(~/bin/repo)= da0514e484f74648a890c0467d61ca415379f791

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

For version 1.22, the SHA-1 checksum for repo is da0514e484f74648a890c0467d61ca415379f791