glab-auth
БесплатноБез исполняемых скриптовНе проверенManage GitLab CLI authentication including login/logout, check auth status, switch accounts, and configure Docker registry access. Use when setting up glab…
от vince-winkintel★ 51 звезда на GitHubОб этом скилле
glab auth
Current captured help and immutable provenance: command reference. Older command captures retain their original provenance and describe earlier interfaces.
Manage GitLab CLI authentication.
OAuth client-ID preflight
Before browser OAuth login, glab checks the public client ID against the instance's token endpoint using a deliberately invalid authorization code. An HTTP 400/401 invalid_client rejects the ID before opening the browser. The request has a five-second timeout and does not follow redirects; network failures, other responses, or an unreadable error body let the normal login flow continue. Passing the preflight is not successful authentication. Do not manually probe token endpoints or supply application secrets to diagnose this check; login and credential storage still require the existing authorization.
OAuth validation and recovery
GitLab.com always uses the built-in OAuth client ID; a configured client_id or GITLAB_CLIENT_ID does not override it. Self-Managed/Dedicated application IDs are trimmed and validated before opening a browser/device flow. Supply the public Application ID, not an application secret.
An invalid_grant during refresh first allows bounded rereads for credentials rotated by another process. If the failed refresh token is still current, glab clears it so subsequent calls do not resend it; transient failures do not clear it. Stop repeated failing operations and arrange explicitly approved reauthentication for that exact host. Do not print stored tokens or automatically broaden credential-helper scope.
For an SSH remote on a subdomain of a configured GitLab host, the diagnostic can suggest ssh_host. Verify those hosts represent the same instance before approving the mapping; a subdomain can be a separate instance, and glab does not silently infer trust.
Environment credentials and trusted hosts
Environment token, job_token, and is_oauth2 settings resolve only for trusted hosts: the effective default host (including GITLAB_HOST / GITLAB_URI / GL_HOST, or CI_SERVER_FQDN under CI auto-login; otherwise the configured default or gitlab.com), a host in the configuration's hosts map, or the host of a user-set GITLAB_REPO URL or git@host:path value. A bare HOST/OWNER/REPO value does not add trust. HTTP(S) host comparisons retain ports; SSH repository URLs use the hostname without the SSH port.
An arbitrary host supplied only through a command argument, such as a full-URL repository selector, does not receive environment credentials. glab warns when it withholds an environment token. This restriction does not remove explicit per-host stored credentials. Inspect the intended host and actor before approving authentication or changing a host selector; do not add an untrusted destination to configuration merely to suppress a warning. Non-secret environment-backed settings such as api_host still resolve normally, so review those routing settings too.
Default host after login
Successful login can change the global default host used outside a Git repository. If the default is still gitlab.com and there are no credentials for it, glab selects the newly authenticated host automatically. Existing credentials, including an environment token, prevent that automatic switch; unreadable credential storage is treated conservatively. Otherwise interactive login asks first, while non-interactive login prints the glab config set --global host <host> command for a separate approved change. CI and a set GITLAB_HOST, GITLAB_URI, or GL_HOST leave the configured default unchanged. A default-host update failure is a warning after successful authentication.
Inside a checkout, remote-host selection takes precedence over the configured fallback host; an environment-selected host is authoritative and errors when no remote matches it. Verify the host after login before subsequent writes.
The Git credential helper formats its response from the resolved credential: a job token uses gitlab-ci-token, a personal token uses the configured host username (falling back to glab), and an OAuth credential uses oauth2 plus available expiry/refresh fields. Do not infer which token was returned from a separate job_token config lookup. The helper remains a credential-producing command, so do not run it for diagnostics or print its output.
Generic credential-helper protocol
glab auth credential-helper is a hidden, credential-producing JSON protocol, distinct from the Git credential-helper setup and auth status. Never invoke it as a diagnostic or capture its output: a successful response contains a token. Integrations must inspect stdout JSON type, not just the process status. Credential resolution errors can exit 0 with type: "error"; flag validation errors exit nonzero. Error code is stable for branching, while message is not. Codes are not_authenticated, `unsup
Установить glab-auth в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл glab-auth?
Manage GitLab CLI authentication including login/logout, check auth status, switch accounts, and configure Docker registry access. Use when setting up glab for first time, troubleshooting auth issues, switching GitLab instances/accounts, or configuring Docker to pull from GitLab registry. Triggers on auth, login, logout, authentication, credentials, token, Docker registry.
Как установить скилл glab-auth?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл glab-auth запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub