---
name: "gbp.conf"
section: "5"
platform: "linux"
package: "git-buildpackage"
version: "0.9.38"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gbp.conf"
---

# gbp.conf(5)

Gbp configuration file

## NAME

gbp.conf - Gbp configuration file

## SYNOPSIS

- /etc/git-buildpackage/gbp.conf

  system wide

- \~/.gbp.conf

  per user

- .gbp.conf

  per branch, can be published with the repository (deprecated)

- debian/gbp.conf

  per branch, can be published with the repository

- .git/gbp.conf

  per repository

## DESCRIPTION

The FC*gbp.conf*F\[0\] configuration files provide default global options and specific options for individual **gbp** commands. All files have the same format as described below and are parsed in the above order from top to bottom with increasing precedence. Non existing files will be skipped.

Each file consists of either zero or one default section, and zero or one sections for each **gbp** command. Additionally, there can be an arbitrary number of FC**remote-config**F\[0\] sections. Comments start with a hash sign (FC**#**F\[0\]). The overall layout is:

```
FC
      [DEFAULT]
      # This section is for global settings. Affects all commands.
      # Options set here have the lowest priority.
      key = value
      [<command>]
      # Specific sections for each command, like buildpackage
      # Options set here have lower priority than command line options
      key = value
      [remote-config <name>]
      # Specific sections for a remote configuration. This can be used several
      # times to set up remote configuration for gbp create-remote-repo
      key = value
    F[0]
```

The sections for each command are named like the command (without **gbp**) surrounded by square brackets (e.g. FC**\[buildpackage\]**F\[0\]). For backwards compatibility, command sections starting with FC*git-*F\[0\] or FC*gbp-*F\[0\] are also supported but will provoke a warning when parsed by **gbp**.

The keys in the FC**key**F\[0\]=FCvalueF\[0\] pairs are named like the command-line options of the corresponding command (with the '--' stripped off) and can hold the same values, but see below for details. In case of **gbp buildpackage** and **gbp buildpackage-rpm** the key needs '--git-' instead of '--' stripped off.

For example, the [**gbp-buildpackage**(1)](/gbp-buildpackage/1.md) manual page documents the FC**--git-export-dir**F\[0\]=FCdirectoryF\[0\] option which can be turned into configuration file setting by dropping the FC**--git-**F\[0\] prefix:

```
FC
      [buildpackage]
      export-dir = directory
    F[0]
```

Options that can be repeated on the command line take Python-like lists in the config file. For example, the [**gbp-import-orig**(1)](/gbp-import-orig/1.md) command has the FC**--filter**F\[0\]=FCpatternF\[0\] option which can be turned into a configuration file option like this:

```
FC
      [import-orig]
      filter = [ '.svn', '.hg' ]
    F[0]
```

Boolean options can be either FC**True**F\[0\] or FC**False**F\[0\]. For example, [**gbp-import-orig**(1)](/gbp-import-orig/1.md) has the FC**--pristine-tar**F\[0\] and FC**--no-pristine-tar**F\[0\] options which translate to:

```
FC
      [import-orig]
      pristine-tar = True
    F[0]
```

and

```
FC
      [import-orig]
      pristine-tar = False
    F[0]
```

respectively.

### REMOTE SITE CONFIGURATION

[**gbp-create-remote-repo**(1)](/gbp-create-remote-repo/1.md) can additionally parse remote site configurations from FC*gbp.conf*F\[0\]. For example, a configuration like:

```
FC
      [remote-config pkg-libvirt]
      # Location of the repository
      remote-url-pattern = ssh://git.debian.org/git/pkg-libvirt/%(pkg)s
      # Template dir to passed to git-init
      template-dir = /srv/alioth.debian.org/chroot/home/groups/pkg-libvirt/git-template
    F[0]
```

can be used to create remote repositories for the pkg-libvirt project using:

```
FC
      gbp-create-remote-repo --remote-config=pkg-libvirt
    F[0]
```

This can be useful if you're often creating new remote repositories for different projects.

### NOTES

**Note**

To see the current set of values that would be applied after parsing the configuration files, use [**gbp-config**(1)](/gbp-config/1.md).

**Note**

**gbp import-dscs** and **git-pbuilder** can't be configured via FC*gbp.conf*F\[0\].

## EXAMPLES

An example set up for packaging work:

```
FC
      # $HOME/.gbp.conf
      [DEFAULT]
      pristine-tar = True
      cleaner = fakeroot debian/rules clean
      [buildpackage]
      export-dir  = ../build-area/
      [import-orig]
      dch = False
        filter = [
        '.svn',
        '.hg',
        '.bzr',
        'CVS',
        'debian/*',
        '*/debian/*'
      ]
      filter-pristine-tar = True
      [import-dsc]
      filter = [
        'CVS',
        '.cvsignore',
        '.hg',
        '.hgignore'
        '.bzr',
        '.bzrignore',
        '.gitignore'
      ]
      # End of file
    F[0]
```

## ENVIRONMENT

The following environment variables can be used to modify **gbp**'s configuration file handling:

- **GBP\_CONF\_FILES**

  A colon separated list of configuration files to parse. If unset or empty the default list of files is parsed (see above).

- **GBP\_DISABLE\_SECTION\_DEPRECATION**

  When set to a non-empty value don't print a deprecation warning in case **gbp** encounters a section starting with *git-* or *gbp-*.

- **GBP\_DISABLE\_GBP\_CONF\_DEPRECATION**

  When set to a non-empty value don't print a deprecation warning in case **gbp** encounters a configuration file in a deprecated location.

## FILES

See FC*/etc/git-buildpackage/gbp.conf*F\[0\] for an example.

## SEE ALSO

[**gbp-config**(1)](/gbp-config/1.md), [**gbp-clone**(1)](/gbp-clone/1.md), [**gbp-create-remote-repo**(1)](/gbp-create-remote-repo/1.md), [**gbp-pq**(1)](/gbp-pq/1.md), [**gbp-pull**(1)](/gbp-pull/1.md), [**gbp-dch**(1)](/gbp-dch/1.md), [**gbp-import-dsc**(1)](/gbp-import-dsc/1.md), [**gbp-import-orig**(1)](/gbp-import-orig/1.md), [**gbp-buildpackage**(1)](/gbp-buildpackage/1.md),\
        The Git-Buildpackage Manual ⟨file:///usr/share/doc/git-buildpackage/manual-html/index.html⟩

## AUTHORS

Guido Günther \<FCagx@sigxcpu.orgF\[0\]\>

This manual page is based on a POD version by Jari Aalto \<FCjari.aalto@cante.netF\[0\]\>. Released under license GNU GPL version 2 or (at your option) any later. version.
