# Issue with git version and git-email

**URL:** <https://travis-ci.community/t/issue-with-git-version-and-git-email/5928>\
**Category:** Linux\
**Tags:** build-env\
**Created:** [November 14, 2019, 1:18am UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928 "2019-11-14T01:18:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipec](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/felipec/32/3128_2.png) [@felipec](https://travis-ci.community/u/felipec)\
**Post date:** [November 14, 2019, 1:18am UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928/1 "2019-11-14T01:18:48Z")

</div>

My build environment used to work, but then it seems you updated the version of the git package and I get [this error](https://travis-ci.org/felipec/git-send-series/builds/606983834):

> The following packages have unmet dependencies:
> 
> 236 git-email : Depends: git (\< 1:2.7.4-.)

If I don’t install the git-email package my [tests fail](https://travis-ci.org/felipec/git-send-series/builds/566672641).

So how am I supposed to do the git-email tests if I can’t install the git-email package? I also can’t specify a specific version of git, can I?

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 14, 2020, 8:14am UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928/2 "2020-01-14T08:14:34Z")

</div>

Hey @felipec,

Can you provide the following? `/usr/bin/time brew update --verbose --debug --force`?

---

<div class="post-metadata">

**Author:** ![felipec](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/felipec/32/3128_2.png) [@felipec](https://travis-ci.community/u/felipec)\
**Post date:** [January 16, 2020, 2:04pm UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928/3 "2020-01-16T14:04:30Z")

</div>

@Montana:

```
/usr/bin/time brew update --verbose --debug --force
/usr/bin/time: cannot run brew: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 1320maxresident)k
0inputs+0outputs (0major+30minor)pagefaults 0swaps
The command "/usr/bin/time brew update --verbose --debug --force" failed and exited with 127 during .
```

---

<div class="post-metadata">

**Author:** ![szeder](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/szeder/32/3177_2.png) [@szeder](https://travis-ci.community/u/szeder)\
**Post date:** [January 16, 2020, 2:31pm UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928/4 "2020-01-16T14:31:10Z")

</div>

You might need to add the `ppa:git-core/ppa` package repository.

Travis CI’s Xenial images contain the `git` package installed from this PPA, so it’s considerably newer than the `git` package in the standard Ubuntu package repositories. Nowadays these third-party apt-repositories are removed from the Xenial images (to reduce the risk of unrelated interference and faster ‘apt-get update’) [[src](https://docs.travis-ci.com/user/reference/xenial/#third-party-apt-repositories-removed)], and the version of the `git-email` package coming from the standard Ubuntu package repositories doesn’t match the much more recent version of the `git` package installed from the PPA, resulting in this dependecy error.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 16, 2020, 8:04pm UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928/5 "2020-01-16T20:04:05Z")

</div>

Hey @felipec,

> [@szeder](#):
>
> `ppa:git-core/ppa`

For some reason I thought this was tagged on macOS. Good point, you may want to try and run `add-apt-repository ppa:git-core/ppa # apt update; apt install git` this will ensure you have the latest git packages so there are no package collisions.

---

<div class="post-metadata">

**Author:** ![felipec](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/felipec/32/3128_2.png) [@felipec](https://travis-ci.community/u/felipec)\
**Post date:** [January 16, 2020, 11:06pm UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928/6 "2020-01-16T23:06:13Z")

</div>

That did the trick.

However, the Xenial documentation seems to be wrong, it says to do:

```auto
dist: xenial
addons:
  apt:
    sources:
      - ppa:git-core/ppa
    packages:
      - git-ppa

```

However, it should be:

```auto
addons:
  apt:
    sources:
      - git-core
    packages:
      - git

```

It’s not `ppa:git-core/ppa`, it’s `"sourceline": "ppa:git-core/ppa"`, or the alias `git-core`. And the package is not `git-ppa`; it’s `git`.

That does work, except that git-email for some reason doesn’t depend on libmailtools-perl as it should (debian bug [#895874](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895874)).

So in the end this is what I did:

```auto
addons:
  apt:
    sources:
      - git-core
    packages:
      - libmailtools-perl
      - git-email

```

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 17, 2020, 9:14am UTC](https://travis-ci.community/t/issue-with-git-version-and-git-email/5928/7 "2020-01-17T09:14:25Z")

</div>

Hey @felipec,

Great to hear it did the trick for you! Thank you for sharing your process also.
