Skip to content

GitLab Operations & Permissions

The project lives on Drupal.org’s self-managed GitLab at git.drupalcode.org. Not every GitLab operation behaves the way it would on gitlab.com: some work fine over the REST API or CLI, some are intercepted by Drupal.org and have to go through the GitLab web UI (or a site admin), and some need maintainer-level access on the project. This page summarizes what we have actually confirmed while working on the project.

ActionChannelWorks today?Access needed
Clone & push codeSSH — git@git.drupal.orgYesPush access (Developer / “Write to VCS”)
Push over HTTPSHTTPSNo (401)— use SSH instead
ActionChannelWorks today?Access needed
Read data (projects, pipelines, jobs, artifacts, issues)REST API GET (token) or glabYesAny authenticated user
Validate CI configREST API POST /ci/lint or glabYesAny authenticated user
Create & edit issuesREST API POST/PUT /issues or glabYesAny authenticated user
ActionChannelWorks today?Access needed
Run a pipeline on demandREST API POST /pipelineNo (301 → drupal.org/git-error)Use GitLab UI: Build → Pipelines → Run pipeline
Create a pipeline scheduleREST APINo (blocked, same pattern)GitLab UI: Build → Pipeline schedules (maintainer)
ActionChannelWorks today?Access needed
Change the default branchGitLab UI (self-service); API is blockedYes, via UIMaintainer
Set protected branches / push rulesREST APINo (301)drupal.org site admins (beyond a project maintainer)
ActionChannelWorks today?Access needed
Merge an MR (unprotected branch)GitLab UI / APIYesDeveloper (“Write to VCS”)
Merge to a protected branchGitLab UIYesMaintainer
ActionChannelWorks today?Access needed
Manage EpicsGitLab UI / APINo (no permission on the shared project group)Use a tracking issue with a checklist as the epic-equivalent
Grant contributors more accessdrupal.org project → Maintainers page (syncs to GitLab roles)YesMaintainer / owner
ActionChannelWorks today?Access needed
Enable the pre-commit / pre-push hookslocal lefthook install (see Developer Setup)YesNone (per clone)

API calls need a GitLab personal access token, sent as a PRIVATE-TOKEN header. glab uses the same token, pointed at git.drupalcode.org rather than gitlab.com.

The Git SSH host is git.drupal.org, not git.drupalcode.org (the latter is the web-UI host only). Using the wrong host produces a port-22 timeout that looks like a firewall block rather than an authentication error. HTTPS pushes are rejected with a 401, so SSH is the only working push channel. See Developer Setup for the clone command.

Several write operations return 301 → https://www.drupal.org/git-error because Drupal.org manages those settings itself, not raw GitLab. Confirmed blocked over the API: triggering pipelines, and project-settings mutations (changing the default branch, setting protected branches, and push rules). Do these in the GitLab web UI instead, or — for infra-level settings such as protected branches and push rules — ask a Drupal.org site admin.

Reads, CI lint, and issue create/edit all work over the API. Sibling issues in this epic were revised via the API. See Contribution Standards for the issue and commit conventions those calls follow.

Drupal maps project roles to GitLab roles:

  • “Write to VCS”Developer — push, and merge unprotected MRs.
  • Adding “Administer maintainers”Maintainer — project settings, merging to protected branches, and changing the default branch.

Grant these on the project’s Maintainers page on Drupal.org; they sync to GitLab. Epics are the exception: they need permissions on the shared project group that individual project maintainers don’t have — hence the checklist-issue workaround listed in the table above.

glab works for the API-allowed operations (reads, issues, CI lint) with the same token. The same Drupal.org write-blocks apply, so glab cannot trigger pipelines or change protected settings either.