You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup-guides/connect-git.md
+32-9Lines changed: 32 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,22 +50,44 @@ Then select the repository containing your dbt project. This becomes your Cloud
50
50
51
51
## Connect GitLab
52
52
53
-
GitLab uses Personal Access Tokens (PAT) instead of OAuth.
53
+
GitLab uses Personal Access Tokens (PAT) instead of OAuth. Unlike GitHub, where the Recce GitHub App posts comments as itself, GitLab API comments appear as the token owner. We recommend creating a dedicated service account so that PR comments appear as a bot rather than your personal account.
54
54
55
-
### 1. Create a Personal Access Token
55
+
!!! tip "Use a shared team email"
56
+
When creating the service account, use a shared team email (e.g., `data@yourcompany.com`) so it isn't tied to any individual.
56
57
57
-
In GitLab: User Settings → Access Tokens → Add new token.
58
+
### 1. Create a Dedicated Service Account (Recommended)
58
59
59
-
**Required scopes:**
60
+
If you use your personal token, your teammates see PR comments from *you* rather than from Recce Cloud. To avoid this, create a **GitLab service account** for Recce Cloud:
60
61
61
-
-`api` - Full access (required for PR comments)
62
-
-`read_api` - Read-only alternative (limited functionality)
62
+
1. In GitLab, navigate to your **group → Settings → Service Accounts**
63
+
2. Click **Add service account**
64
+
3. Set the name to **Recce Cloud** (username auto-generates)
65
+
4. Click **Create service account**
66
+
5. (Optional) Edit the account to customize the username and upload a Recce avatar
**Expected result:**Service account appears in the group's member list with a "service account" badge.
65
69
66
-
### 2. Add Token to Cloud
70
+
Add the service account as a **Developer** member to the projects you want Recce Cloud to access.
67
71
68
-
Navigate to Settings → Git Provider. Select GitLab, paste token.
72
+
!!! info "Availability"
73
+
GitLab service accounts are available on GitLab.com Free (up to 100 per group), Premium, and Ultimate. For Self-Managed Free instances where service accounts are unavailable, create a dedicated GitLab user (e.g., `recce-cloud-bot`) instead.
74
+
75
+
If you don't have group admin access, you can skip this step and use a personal access token directly. Note that PR comments will appear as your user account.
76
+
77
+
### 2. Create a Personal Access Token
78
+
79
+
Generate a PAT for the service account (or your personal account if you skipped Step 1):
80
+
81
+
1. For a **service account**: navigate to your **group → Settings → Service Accounts**, select the account, and click **Create token**
82
+
2. For a **personal token**: navigate to **User Settings → Access Tokens → Add new token**
83
+
3. Set a descriptive name (e.g., "Recce Cloud integration")
84
+
4. Select the **`api`** scope (required for posting PR comments). The `read_api` scope is not sufficient.
85
+
5. Set an expiration date and click **Create**
86
+
6. Copy the token immediately (it cannot be viewed again)
87
+
88
+
### 3. Add Token to Cloud
89
+
90
+
Navigate to **Settings → Git Provider** in Recce Cloud. Select GitLab and paste the token.
69
91
70
92
## Verify Success
71
93
@@ -84,6 +106,7 @@ In Cloud, navigate to your repository. You should see:
84
106
| Repository not found | Ensure proper permissions are granted (GitLab: token access, GitHub: app authorized) |
85
107
| Invalid token (GitLab) | Generate new token with `api` scope |
86
108
| Cannot post PR comments (GitLab) | Regenerate token with `api` scope instead of `read_api`|
109
+
| PR comments show as personal user (GitLab) | Create a [service account](#1-create-a-dedicated-service-account-recommended) and use its token instead of your personal token |
0 commit comments