---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
  - property: og:type
    content: article
  - property: article:section
    content: Интеграция с другими сервисами
  - property: og:title
    content: GitHub
  - property: article:tag
    content: Сборник инструкций
alternate:
  - https://yandex.ru/support/tracker/en/user/github.md
  - https://yandex.ru/support/tracker/ru/user/github.md
  - href: en/user/github.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/tracker/en/llms.txt


# GitHub

You can integrate your GitHub repository with Yandex Tracker to display links to commits in issues.

To add a commit link to an issue, specify the [issue key](*issuekey) in the commit comment, for example, `Fixing error TEST-123`. The link will appear in the issue's **Commits** tab. For more information, see [Integration with repositories](https://yandex.ru/support/tracker/en/user/add-repository.md).

You can choose one of the following integration methods:

* Configure a webhook in the repository. We recommend using this sync method if you have an on-premises GitHub repository. This approach allows for faster data synchronization, so new commits will appear in the dedicated Yandex Tracker issue almost immediately.

* Configure periodic repository polling. Yandex Tracker will periodically poll the repository for information about commits.

  You can configure this sync method for repositories hosted online or deployed on-premises.

{% note warning "" %}

When polling a repository, links to commits may appear in Yandex Tracker with a delay of up to 10 hours.

{% endnote %}

## Configuring a webhook in the repository {#webhook}

{% note warning "" %}

Syncing via a webhook is available for on-premises repositories.

{% endnote %}


1. In Yandex Tracker, obtain a URL and a token to configure the webhook: [How to obtain a URL and token](https://yandex.ru/support/tracker/en/user/add-repository.md#get-token).

1. Go to the main page of your GitHub repository.

1. On the toolbar, click **Settings**.

1. Click **Add webhook**.

1. In the **Payload URL** field, enter the URL you copied in Yandex Tracker.

1. In the **Secret** field, enter the token you copied in Yandex Tracker.

1. Under **Which events would you like to trigger this webhook?**, select **Just the push event**.

1. Click **Add webhook**.

<!-- source: en/_includes/gitlab/test-hook.md -->
To make sure the webhook is running properly:

1. Create or select an existing issue in Yandex Tracker where you will test a link to a commit.

1. Create a commit in your repository and specify the issue key in its comment, for example, `Fixing error TEST-123`.

1. Make sure the **Commits** tab on the issue page in Yandex Tracker displays information about your commit.
<!-- endsource: en/_includes/gitlab/test-hook.md -->


## Configuring repository polling {#poll}

### Integrating an online repository {#repo}

To connect your repository on [GitHub](https://github.com) to Yandex Tracker:

<!--{% list tabs %}
- Публичный репозиторий
    1. {% include [make sure you are admin](../_includes/make-sure-admin.md) %}
    1. {% include [path to the repository](../_includes/repository-path.md) %}
    1. В поле **Платформа** выберите GitHub.
    1. Укажите адрес публичного репозитория в формате `https://github.com/<логин_владельца_репозитория>/<имя_репозитория>`. Поле **Токен** оставьте пустым.
    1. Нажмите кнопку **Подключить**.
    1. Убедитесь, что статус репозитория отображается в Трекере как **Подключен**.
- Закрытый репозиторий -->

1. Obtain a token on GitHub to access your repository:

    - Log in to GitHub. If the repository is linked to an organization on GitHub, make sure that you have admin rights for it.

    - Click your profile picture in the upper-right corner and select **Settings**.

    - In the left-hand panel, select **Developer settings** → **Personal access token** → **Tokens (classic)**.

    - Click **Generate new token**.

    - Enter a name for the token.

    - Configure permissions for the token. For Yandex Tracker to operate properly, enable the **repo** and **read:org** options:

        ![](../_assets/github-token-settings.png)

    - Click **Generate token**.

    - Copy the token to the clipboard.

    {% note alert "" %}

    The token value is displayed only once — remember to save it. If you close the page, you will not be able to view it again.

    {% endnote %}

1. <!-- source: en/_includes/make-sure-admin.md -->
   Make sure you are authorized in Tracker as an [administrator](https://yandex.ru/support/tracker/en/role-model.md).
   <!-- endsource: en/_includes/make-sure-admin.md -->

1. <!-- source: en/_includes/repository-path.md -->
   In Yandex Tracker, in the left-hand panel, click ![](../_assets/svg/actions.svg)</svg> → ![](../_assets/svg/admin.svg)</svg> **Administration** and then open ![](../_assets/svg/repositories.svg)</svg> **Repositories**.
   <!-- endsource: en/_includes/repository-path.md -->

1. Click **Add** and select **Repository**.

1. Choose GitHub in the **Platform** field.

1. Choose **github.com** for the **Server address** option.

1. In the **Repository** field, enter the address in this format: `https://github.com/<repository_owner_login>/<repository_name>`, then specify the access token.

1. Click **Add**.

1. Make sure that the repository status in Yandex Tracker is **Connected**.

<!--{% endlist %}-->

### Integrating an on-premises repository {#on-premise}

Before continuing, obtain a token to access the repository. For instructions on how to obtain a token, see the [GitHub documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app).

<!-- source: en/_includes/on-premise-server.md -->
To integrate an on-premises repository with Yandex Tracker:

1. <!-- source: en/_includes/make-sure-admin.md -->
   Make sure you are authorized in Tracker as an [administrator](https://yandex.ru/support/tracker/en/role-model.md).
   <!-- endsource: en/_includes/make-sure-admin.md -->

1. <!-- source: en/_includes/repository-path.md -->
   In Yandex Tracker, in the left-hand panel, click ![](../_assets/svg/actions.svg)</svg> → ![](../_assets/svg/admin.svg)</svg> **Administration** and then open ![](../_assets/svg/repositories.svg)</svg> **Repositories**.
   <!-- endsource: en/_includes/repository-path.md -->

1. Click **Add** and select **Repository**.

1. In the **Platform** field, select the type of your repository.

1. Choose **Own** for the **Server address** option.

1. In the **Repository** field, specify the URL of the repository on your server. Make sure that you connect to the server using the OAuth 2.0 technology.

1. In the **Token from platform** field, enter the token for connecting to your server.

1. Click **Add**.

1. Make sure that the repository status in Yandex Tracker is **Connected**.
<!-- endsource: en/_includes/on-premise-server.md -->

[*issuekey]: An issue key is a unique identifier contained in the issue link. It consists of the queue key and a number, for example `TEST-123`.