Connecting GitLab
Connect GitLab to GitSec to back up your projects the same way you do on GitHub and Bitbucket. You can connect GitLab.com with OAuth, or a Self-Managed GitLab instance that you run yourself with its address and an access token.
Connect GitLab.com
- In the sidebar, navigate to Repositories > Add Provider.
- Click the GitLab card.
- You will be redirected to GitLab.com to authorize GitSec.
- Approve the authorization request.
After authorization, you will be redirected back to GitSec. Your connected projects will appear under Repositories > GitLab.
Connect a Self-Managed GitLab
Use this option for a GitLab instance that you host yourself. Your instance must run GitLab 13.0 or later.
- In the sidebar, navigate to Repositories > Add Provider.
- Click the Self-Managed GitLab card (Connect a GitLab you run yourself using an access token).
- Enter the GitLab address of your instance.
- Enter an Access token.
- Submit the form to complete the connection.
- The address must use HTTPS and be reachable from the internet. Local or private network addresses are not accepted.
- The address cannot contain
?,#, or a username or password.
The Access token must be a personal or group access token with the api scope.
- The token is stored encrypted and is never shown again after you submit it.
- GitSec uses the token only to read the projects it backs up.
- If you revoke the token in GitLab, the connection stops working.
- GitSec does not renew the token. When it expires, reconnect the instance with a new token.
Each Self-Managed instance you connect appears as its own entry under Repositories.
New Projects and Push Events
- New projects: GitSec picks up new projects automatically with an hourly sync. After you connect GitLab for the first time, the first sync runs about 15 minutes later.
- Push event backups: During the sync, GitSec registers a project webhook for push and tag push events by itself. For a Self-Managed instance, your instance must be able to reach GitSec for push events to arrive. See Push Event Backups for details.
You can restore backups into GitLab.com or a Self-Managed instance. When you restore into GitLab, you can choose your personal namespace or a group you can create projects in as the Target namespace. See Restore Overview for details.
Managing Connected Repositories
Once connected, go to Repositories > GitLab to see all your projects. From there, you can activate or deactivate individual repositories for backup. See Managing Repositories for more information.
Next Steps
With GitLab connected, you're ready to create your first backup.