GitLab Integration
Work with Devin directly in your GitLab repositories
Why integrate Devin with GitLab?
Integrating Devin with your GitLab repositories allows Devin to clone repositories, create merge requests, and collaborate effectively with your team. This integration enables Devin to work seamlessly within your existing development workflow.
Setting up the Integration
- In your Devin account at app.devin.ai, go to Devin’s Workspace, and click the “Advanced Setup” button.
- Once on the Advanced Setup page, click the “Edit” -> “Set up in VSCode” button.
- Use the terminal within VSCode to add your GitLab PAT token and then clone your repositories.
Before proceeding with the setup, ensure you have:
- Access to your GitLab account
- A Personal Access Token (PAT) with appropriate permissions
Creating a Personal Access Token
- Log in to your GitLab account
- Click on your profile picture in the top-right corner
- Select “Edit profile”
- On the left sidebar, select “Access Tokens”
- Fill in the following details:
- Token name: A descriptive name (e.g., “Devin Integration”)
- Expiration date: Select a date (maximum 365 days)
- Scopes: Select the required permissions (see Required Permissions section)
- Click “Create personal access token”
- Important: Save the token immediately as you won’t be able to see it again
Cloning Repositories
- Create a directory for your repositories:
- Clone your repository:
- Repeat step 2 for each repository you want to clone.
Clone all the repositories that you want to give Devin access to. Once you finish with this machine setup, a machine snapshot will be saved. You can use this machine snapshot to kickoff any new session with the same setup.
Required Permissions
When creating your Personal Access Token (PAT), ensure it has the following scopes:
- api
- Full API access
- read_repository
- Read repository code
- write_repository
- Create merge requests
- Push code
- read_registry
- Pull container images
- write_registry
- Push container images
We recommend setting up protected branches in GitLab to ensure all changes go through proper review processes before being merged.
Security Considerations
- Store your PAT securely and never commit it to source control
- Use a dedicated service account for Devin’s integration if possible
- Enable protected branches to enforce code review requirements
- Set an appropriate expiration date for your PAT (maximum 365 days)
External Documentation
For more detailed information, refer to these official GitLab docs: