I want to build a debian package with git build package.(gbp) I passed all steps, and at least, when I entered gbp buildpackage, This error appeared.

what does it mean? and what should I do?

gbp:error: upstream/1.5.13 is not a valid treeish

3 Answers 3


This can be caused by the tarball not being present in the parent directory. I get this (highly crypric) message even with a debian/ folder present.

My solution was to use uscan to get the watch file to download a fresh copy of the tarball

uscan --force-download
  • I get this too. One answer is to ensure that you have spelled the tarball's name correctly according to Debian's requirements and that it has the 'orig' name in it as well.
    – jeremiah
    Commented May 15, 2019 at 13:16

The current tag/branch you are in, is not a Debian source tree, it doesn't contain the debian/ directory in its root. This is evident because you are using a "upstream/" branch, a name utilized to upload the pristine source tree to git repositories. Try using the branch stable, testing or unstable, or any branch that starts with Debian or a commit tagged using the Debian versioning scheme.

  • 1
    I often use git to create a debian specific branch; git checkout -b debian/master
    – jeremiah
    Commented May 1, 2019 at 17:04

In my case I had to create a tag with version number named like 'upstream/1.5.13' in the git repository to fix this error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .