GitLab — Connect and Verify
Goal
Verify GitLab CLI authentication (or API token) and store project details in config so branch creation, MR creation, and other GitLab skills work seamlessly.
Step 1: Check GitLab CLI is Available
which glab && glab --version
If not found:
"GitLab CLI (
glab) is not installed. Install it from https://gitlab.com/gitlab-org/cli or run:
- macOS:
brew install glab- Ubuntu:
sudo apt install glab- Windows:
winget install Glab.Glab"
If glab is unavailable, fall back to API token (direct curl calls). Ask which approach to use.
Step 2: Authenticate (CLI path)
glab auth login
Follow prompts:
- GitLab instance:
gitlab.comor your self-hosted URL - Authentication: Token (recommended) or Web Browser
- Provide a Personal Access Token with scopes:
api,read_user,write_repository
Security note: provide the token interactively — do not paste it in this chat.
Step 3: Verify Authentication
glab auth status
Should show: ✓ Logged in to {instance} as {username}
Step 4: Set Default Project
glab config set -g default_project "{namespace/project-name}"
Or configure via _superml/config.yml:
integrations:
gitlab:
instance: "gitlab.com"
namespace: "{namespace}"
project: "{project-name}"
default_branch: "main"
connected: true
connected_at: "{date}"
Step 5: Verify Project Access
glab repo view {namespace/project-name}
Done
✅ GitLab connected. You can now use
gitlab-create-branchandgitlab-create-mr.