Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

GitLab connector

Git Town can interact with GitLab in two different ways.

  1. GitLab API:
    Git Town communicates directly with the GitLab API using a personal access token. You’ll need to generate this token at gitlab.com/settings/tokens.

    By default, Git stores such tokens in plaintext in your Git configuration. To avoid this, consider configuring Git to use your operating system’s encrypted credentials storage for better security.

  2. GitLab CLI (glab):
    The glab CLI handles authentication and token management for you.

config file

It is generally not recommended to hardcode the connector type in your config file, as it enforces usage or non-usage of glab for your entire team. If you want to set it explicitly, it would look like this:

[hosting] gitlab-connector = "api" # or "glab"

Git metadata

You can configure the API token manually by running:

git config [--global] git-town.gitlab-connector <api|glab>

The optional --global flag applies this setting to all Git repositories on your machine. Without it, the setting applies only to the current repository.