Skip to main content

GitLab


To integrate your GitLab repositories with Komment, you will need to mirror them on GitHub.

Steps

  1. First, go to GitHub and create a destination repository.

Crate new GitHub repository

  1. Your destination repository can be empty, but be sure to give it a name and set its visibility (public or private) according to your needs. Once you've filled in the details, click Create repository to proceed.

Populate repository details

  1. Once the repository is created, make a note of the destination repository URL.

Copy destination repository URL

  1. Next you will need to create a Fine-Grained Access Token in GitHub.

Create a token

  1. You can choose the token expiration that suits your organisation best. Remember that if this token expires, you will need to update the connection in GitLab.

Set token expiry

  1. Allow access to the newly created destination repository.

Give access to destination repository

  1. Under Permissions, set the Contents permissions to Read and write.

Give content permissions

  1. You can now generate your token. Make sure to copy the token, as you will need this later.

Copy the token

  1. Navigate to the GitLab repository you want to import into Komment and access the repository settings.

GitLab repository settings

  1. Locate Mirroring repositories and click on Add new.

New mirror

  1. Enter the git URL of the destination repository. This should end .git.

Enter destination URL

  1. Enter your username and in the password field, paste the short-lived token you created. Click Mirror repository to continue.

Mirror repository

  1. Click on Update now to update the remote destination repository. Within a few moments, the repository will be mirrored to GitHub. From that point on, any changes you push to GitLab will also appear on GitHub.

Update remote repository

You can now import the project as normal on Komment.