---
title: "Connect Repositories to App Platform | Hostman Docs"
description: "Explore how to connect to GitHub, GitLab, or Bitbucket repository​ to App Platform in the Hostman dashboard."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

You can connect the repository with your application’s code to our [App Platform](https://hostman.com/paas/) when creating a new app in the Hostman dashboard.

The App Platform supports GitLab, GitHub and Bitbucket repositories, as well as any repositories that can be accessed by URL, including Gitea, self-hosted GitLab, GitHub Enterprise repositories, etc.

## Connecting a Repository from GitHub, GitLab, or Bitbucket

To connect the repository:

1.  Go to the **App Platform** section and click **Create App**.
2.  At the **Repository** step, click on the platform icon.

![Selecting Git Plaform](https://content.hostman.com/assets/42a61deb-eb30-48e8-af68-957141035847?width=756&height=336)

3.  Log in to your account.
4.  Allow access to the required repositories.
5.  Select the repository for deployment in the Hostman dashboard.

If you're already logged into your GitHub, GitLab, or Bitbucket account, Hostman will automatically display the available repositories. All you have to do is select the one you need.

If you are logged in, but the required repository is not available:

1.  Click **Add Account**.
2.  Choose a platform.
3.  Log in if necessary.
4.  Select the required repositories and save the changes.

Then select the desired repository for deployment in the Hostman dashboard.

## Connecting a Repository via URL

You can connect any repository to the App Platform that has an external HTTP or HTTPS address, including repositories from self-hosted GitLab, GitHub Enterprise, or repositories hosted by providers that we do not directly support (for example, Gitea).

The option can also be used for security purposes: if you do not want to give access to the entire Git account, you can only add a specific repository using a link.

> [!NOTE]
> Automatic deployment will not be available for repositories connected via URL. After updating the code, you will need to deploy the application manually selecting the desired commit. 

For public repositories, providing a URL is enough. 

For private repositories, you will need to provide login and password for the account or a token that is generated in the provider interface (GitLab, GitHub, etc.).

### Connect a Repository

You can connect the repository with URL when creating a new application:

1.  Go to the **App Platform** section and click **Create App**.
2.  In the **Repository** step, click **Connect the repository via URL**.
3.  Provide the URL to the repository and access details if the repository is private.
4.  Click **Connect**.

The repository and available commits will be displayed in the dashboard.

The connection link must be in Git URL format, for example:

```shell
https://github.com/hostman/app-example.git
```

In GitHub you can get the required link by clicking on **Code** → **HTTPS**.

The same in GitLab or Bitbucket: go to the desired repository → click on **Code**/**Clone** → **Clone with HTTPS**.

### Get a Token on GitHub

To generate a token in GitHub:

1.  Go to **Settings** → **Developer Settings** → **Personal access tokens** → **Tokens (classic)** → **Generate new token (classic)**.
2.  Set the token name, expiration date, and permissions. To work with private repositories, you need to select **repo**.
3.  Click **Generate token**.
4.  Copy the token and paste it into the **Password or token** field in the Hostman dashboard.

### Get a Token in GitLab

To connect GitLab repositories, you can use your account password or token generated in your GitLab account settings.

1.  Go to **Settings** → **Access Tokens**.
2.  Create a new token, specifying its name, expiration date, and permissions. At a minimum, you will need permission to read repositories.
3.  Click **Create personal access token**.
4.  Copy the token and paste it into the **Password or token** field in the Hostman dashboard.

### Getting a Link and Token in Bitbucket

To access a Bitbucket repository, you need to issue an API token.

1.  Go to your Atlassian **Account settings** → **Security** → [API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens). 
2.  Click **Create API Token with scopes**.
3.  Set the name and expiration date for the token. Click **Next**.
4.  Select **Bitbucket** and click **Next**.
5.  Select `read:repository:bitbucket` and click **Next**.
6.  Click **Create token**.
7.  Copy the token and paste it into the **Password or token** field in the Hostman dashboard.
8.  Go to the repository and click **Clone**. Copy everything that comes after `git clone` and paste it into the **Repository URL** field.
9.  Copy the part of the link between `https://` and `@` and paste it into the **Username** field.

## Removing Connected Repositories

Any added repository can be unlinked from the App platform. 

> [!NOTE]
> If you unlink a repository, any deployments (both automatic and manual) of all applications created from this repository will become impossible.

1.  Go to the **App Platform** section and click **Create App**.
2.  Go to the **Repository** step. Click on the drop-down list of repositories and click **Delete** next to the repository you wish to remove.
3.  Confirm the action.

## Troubleshooting

### App Platform Does Not Display the Repository

If your GitHub, GitLab or Bitbucket account is connected to the [App Platform](https://hostman.com/paas/), but the required repository is not displayed in the Hostman dashboard dashboard, there may be two reasons:

-   You added the repository after you had logged into your GitHub, GitLab, or Bitbucket account from the App Platform.
-   You allowed access to only certain repositories, and the required repository is not selected.

To solve the problem:

1.  Go to the **App Platform** section and click **Create App**.
2.  Go to the **Repository** step and click **Add Account**.
3.  Choose a platform.
4.  Log in if necessary.
5.  Select the desired repository and save your changes.

Connected repositories will appear in the Hostman dashboard, and you can select the one you need.
