Gitlab
Elementary connects to the code repository where your dbt project code is managed, and opens PRs with configuration changes.
Recommended: Connect using Elementary Gitlab App
Navigate to the Account settings > Environments and choose the environment to which you would like to connect the dbt project code repository.
Simply Click the blue button that says “Connect with Elementary Gitlab App” and follow the instructions. In the menu that opens up later on, select the repository where your dbt project is stored, and if needed the branch and path to the dbt project.
Alternative: Create a Gitlab project token
If connecting the Elementary Gitlab App isn’t an option, you can connect using a token managed by your team instead.
Token creation and permissions
Token creation and permissions
You need to create a project access token (token for a specific repository) with by following these steps:
- On the left sidebar, at the top, select Search GitLab to find the dbt project repo.
- Select Settings > Access Tokens.
- Enter a name and expiry date for the token (default is 1 year).
- Select the role Maintainer for the token.
- Select the following scopes:
api
,read_api
,read_repository
,write_repository
. - Select Create project access token.
Repository connection settings
After the authentication, you need to fill in the following details:
- Repository - The full name of the code repo.
- Optional Environment base branch - If you want Elementary to open PRs in a target branch different than default, detail the branch name here.
- Optional Project path - If your dbt project isn't on the root directory of the repo, detail it's path here.
- Optional Update token - When the github token expires, regenerate a fine-grained token and paste it here.
Github connection to Elementary