GitLab Integration
Lastest supports GitLab for authentication, repository sync, and CI/CD -- including self-hosted instances.
Features
- OAuth login -- sign in with your GitLab account
- Self-hosted support -- connect to your own GitLab instance
- MR comments -- automatic build results posted to merge requests
- Webhook-triggered builds -- builds run when MRs are opened or updated
Setup
1. Create a GitLab OAuth Application
- Go to GitLab > Preferences > Applications (or Admin > Applications for instance-wide)
- Create a new application
- Set the callback URL to
http://your-lastest-url/api/auth/callback/gitlab - Select scopes:
read_user,api - Note the Application ID and Secret
2. Configure Environment Variables
GITLAB_CLIENT_ID=your-application-id
GITLAB_CLIENT_SECRET=your-secret
GITLAB_REDIRECT_URI=http://your-url/api/auth/callback/gitlab # Optional
GITLAB_INSTANCE_URL=https://gitlab.your-company.com # Default: https://gitlab.com
GITLAB_WEBHOOK_SECRET=your-webhook-secret # Optional
3. Connect in Lastest
- Go to Settings > GitLab
- Click "Connect GitLab"
- Authorize the application
- Select repositories to sync
Self-Hosted GitLab
Set GITLAB_INSTANCE_URL to your GitLab instance URL. All API calls and OAuth flows will use this URL instead of gitlab.com.