You can connect the repository with your application’s code to our App Platform when creating a new app in the Hostman control panel.
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.
To connect the repository:
Go to the App Platform section and click Create.
At the Repository step, click on the platform icon.
Log in to your account.
Allow access to the required repositories.
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:
Click Add Account.
Choose a platform.
Log in if necessary.
Select the required repositories and save the changes.
Then select the desired repository for deployment in the Hostman dashboard.
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.
Please note that 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.).
You can connect the repository with URL when creating a new application:
Go to the App Platform section and click Create.
In the Repository step, click Connect the repository via URL.
Provide the URL to the repository and access details if the repository is private.
Click Connect.
The repository and available commits will be displayed in the control panel.
The connection link must be in Git URL format, for example:
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.
There are two ways to get a token and link in BitBucket.
Method 1.
Go to Personal Bitbucket settings → App password.
Set the name (Label) and permissions; Read permissions are sufficient.
Click Create.
Copy the password and paste it into the Password or token field in the Hostman dashboard.
Go to the repository and click Clone. Copy everything that comes after git clone
and paste it into the Repository URL field.
Copy the part of the link between https://
and @
and paste it into the Username field.
Method 2.
Go to Settings → Repository settings → Access token → Create Repository Access Token.
Set the name and permissions (Scopes). Permissions to read repositories are sufficient.
Copy the value from the Your Repository Access Token field and paste it into the Password or token field in the Hostman dashboard.
As a link to the repository, use the URL from the How to use this token with your Git repository field. Copy everything that comes after git clone
and paste it into the Repository URL field in the Hostman dashboard.
You won't be able to connect a GitHub repository using your account password; for this you need a token.
To generate a token in GitHub:
Go to Settings → Developer Settings → Personal access tokens → Tokens → Generate a personal access token.
Set the token name, expiration date, and permissions. To work with private repositories, you need to select repo.
Click Generate token.
Copy the token and paste it into the Password or token field in the Hostman dashboard.
To connect GitLab repositories, you can use your account password or token generated in your GitLab account settings.
Go to Preferences → Access Tokens.
Create a new token, specifying its name, expiration date, and permissions. At a minimum, you will need permission to read repositories.
Click Create personal access token.
Copy the token and paste it into the Password or token field in the Hostman dashboard.
Any added repository can be unlinked from the App platform.
If you unlink a repository, any deployments (both automatic and manual) of all applications created from this repository will become impossible.
Go to the App Platform section and click Create.
Go to the Repository step. Click on the drop-down list of repositories and click Delete next to the repository you wish to remove.
Confirm the action.
If your GitHub, Gitlab or Bitbucket account is connected to the App platform, but the required repository is not displayed in the Hostman dashboard control panel, 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:
Go to the App Platform section and click Create.
Go to the Repository step and click Add account.
Choose a platform.
Log in if necessary.
Select the desired repository and save your changes.
Connected repositories will appear in the Hostman dashboard, and you can select the one you need.