GitLab
First you must provide an access token.
GitLab offers different types of access tokens depending on your subscription tier.
- Premium / Ultimate
- Free
Create a Project Access Token
-
Go to your GitLab project
-
Navigate to
Settings>Access Tokens -
Click Add new token button
-
Choose a name, for example:
twigg-mirror-<YOUR-REPO-NAME> -
Select an expiration date (feel free to choose a long duration).
-
Select a role for the token:
Developer(or equivalent). -
Select the following scopes:
read_repositorywrite_repository
-
Click Create project access token button
-
Copy the generated token.
Create a Personal Access Token
-
In the upper-right corner, select your avatar.
-
Select Edit profile.
-
On the left sidebar, select Personal access tokens.
-
Click Add new token button
-
Choose a name, for example:
twigg-mirror-<YOUR-REPO-NAME> -
Select an expiration date (feel free to choose a long duration).
-
Select the following scopes:
read_repositorywrite_repository
-
Click Generate token button
-
Copy the generated token.
Set GitLab mirror in Twigg
-
Go to home and open your repository.
-
Click the repository settings icon.
-
Scroll to Git Mirror section and click on the switch button to enable it.
-
Construct your mirror URL
https://oauth2:<TOKEN>@<HOST>/<GROUP>/<PROJECT>.git- Click
Save URL.
Your setup is complete. From now on, any commits submitted in Twigg will be automatically pushed to the twigg branch of the mirrored repository GitLab.