# Google Repo

**URL:** <https://hub.mender.io/t/google-repo/58>\
**Category:** Yocto Project\
**Tags:** repo\
**Created:** [September 28, 2018, 1:09pm UTC](https://hub.mender.io/t/google-repo/58 "2018-09-28T13:09:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [September 28, 2018, 1:09pm UTC](https://hub.mender.io/t/google-repo/58/1 "2018-09-28T13:09:04Z")

</div>

To simplify fetching sources and setting up the Yocto build environment we have decided to use the Google [repo](https://source.android.com/setup/develop/repo) tool, which allows fetching sources from multiple location in a single command based on manifest files (xml).

Google [repo](https://source.android.com/setup/develop/repo) is widely used within the Yocto community and we have simply adopted the “best practice” for Mender integrations.

The following is a one time installation of Google [repo](https://source.android.com/setup/develop/repo).

Create directory for `repo`

```bash
mkdir ${HOME}/bin

```

Fetch the `repo` script

```bash
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo

```

Set the executable bit

```bash
chmod a+x ${HOME}/bin/repo

```

You should also add the following to your `.bashrc` or equivalent, for convenience.

```auto
PATH=${PATH}:~/bin

```

### Troubleshooting

#### Git user configuration

The `repo` tool is a wrapper for `git` and it will print out an error if you have not setup your `git` identity. You can do this by simply running:

```auto
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

```

This will store the configuration globally (`$HOME/.gitconfig`) and is only required to setup once.

#### missing python

The `repo` tool depends on availability of `python` on the system, e.g Ubuntu 18.04.2 LTS comes with python3 installed by default but not python; to install:

```auto
sudo apt install -y python

```

#### git color

It is also useful setting your git color preference, which avoids having git ask for your preference when running `repo` for the first time:

```auto
git config --global color.ui false

```

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [September 28, 2018, 1:09pm UTC](https://hub.mender.io/t/google-repo/58/2 "2018-09-28T13:09:21Z")

</div>



---

<div class="post-metadata">

**Author:** ![tiny-dancer](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tiny-dancer/32/1550_2.png) [@tiny-dancer](https://hub.mender.io/u/tiny-dancer)\
**Post date:** [March 6, 2022, 11:23pm UTC](https://hub.mender.io/t/google-repo/58/5 "2022-03-06T23:23:42Z")

</div>

When source controlling a project with repo - what is the best practice for .gitignore with .repo? Running into file size issues when attempting to source control .repo/project-objects

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [March 8, 2022, 10:38am UTC](https://hub.mender.io/t/google-repo/58/6 "2022-03-08T10:38:45Z")

</div>

Hi @tiny-dancer,

usually anything `.repo` is just completely ignored in git. Having said that, unless you have specific needs to stick with repo, check out the [kas](https://github.com/siemens/kas) utility which is usually a better fit for managing Yocto builds. We will actively support it in the near future.

Greetz,  
Josef
