← ClaudeAtlas

gitlab-authlisted

Container-adapted GitLab CLI authentication. Supports token environment variables and browser login for headless environments. Use when the user says "login to gitlab", "glab auth login", "authenticate gitlab", or when any GitLab operation fails with auth errors.
f5-sales-demo/marketplace · ★ 0 · Code & Development · score 71
Install: claude install-skill f5-sales-demo/marketplace
**Canonical skill URI**: `skill://gitlab:gitlab-auth` # GitLab CLI Authentication (Container-Adapted) This skill guides authentication for headless container environments where browser-based login may not be available. ## Authentication Methods ### Method 1: Token Environment Variable (Recommended for Automation) Best for CI/CD and automated environments. Use a personal access token or project/group access token. **Prerequisites:** - GitLab personal access token with appropriate scopes (api, read_user, read_repository, write_repository) - Token stored in `GITLAB_TOKEN` environment variable **Command:** ```bash echo "$GITLAB_TOKEN" | glab auth login \ --stdin \ --hostname "${GITLAB_HOST:-gitlab.com}" ``` ### Method 2: Token via stdin (Interactive) Use when a token is available but not stored in an environment variable. **Command:** ```bash echo "<token>" | glab auth login \ --stdin \ --hostname "${GITLAB_HOST:-gitlab.com}" ``` Never pass the token as a command-line argument — always use `--stdin` with a pipe to avoid the token appearing in process listings. ### Method 3: Browser Login (Web) Works when a browser is available (VNC enabled or desktop environment). Opens a browser window for OAuth consent. **Command:** ```bash glab auth login \ --hostname "${GITLAB_HOST:-gitlab.com}" \ --web ``` ### CI/CD Pipeline Authentication In GitLab CI/CD pipelines, use the built-in `CI_JOB_TOKEN`: ```bash echo "$CI_JOB_TOKEN" | glab auth login \ --stdin