BitBucket Integration Guide
Work with Devin directly in your BitBucket repositories
Why integrate Devin with BitBucket?
Integrating Devin with your BitBucket repositories allows Devin to clone repositories, create pull 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 BitBucket Access Token and then clone your repositories.
Before proceeding with the setup, ensure you have:
- Access to your BitBucket account
- An Access Token with appropriate permissions
Creating an Access Token
- Log in to your BitBucket account
- Click on your profile picture in the bottom-left corner
- Select “Personal settings”
- Click on “App passwords” under “Access management”
- Click “Create app password”
- Fill in the following details:
- Label: A descriptive name (e.g., “Devin Integration”)
- Permissions: Select the required permissions (see Required Permissions section)
- Click “Create”
- Important: Save the token immediately as you won’t be able to see it again
Cloning Repositories
For BitBucket Cloud:
For BitBucket Server:
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 Access Token, ensure it has the following permissions:
- Repository Read
- Clone and pull repository content
- Repository Write
- Push code
- Create and manage pull requests
- Pull Request Read
- View pull request details
- Pull Request Write
- Create and manage pull requests
We recommend setting up branch restrictions in BitBucket to ensure all changes go through proper review processes before being merged.
Access Token Features
- Limited Scope: Access Tokens are linked to a specific repository, project, or workspace
- Single Purpose: Designed for use with a single application or integration
- No 2FA Required: Access Tokens don’t require two-step verification
- Enhanced Security: Tokens are encrypted and can’t be viewed after creation
- Granular Permissions: Permissions are specified during token creation
Security Considerations
- Store your Access Token securely and never commit it to source control
- Use a dedicated service account for Devin’s integration if possible
- Enable branch restrictions to enforce code review requirements
- Create separate tokens for different repositories or projects
- Remember that tokens don’t expire automatically - manage them regularly
External Documentation
For more detailed information, refer to these official BitBucket docs: