glab-auth

Authenticate and manage GitLab CLI credentials across multiple instances.

12|2|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/haomingz/kimi-skills --skill glab-auth-haomingz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: glab-auth
Source: https://github.com/haomingz/kimi-skills/tree/main/skills/gitlab-cli-guide/glab-auth
Command: npx skills add https://github.com/haomingz/kimi-skills --skill glab-auth-haomingz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Managing GitLab CLI credentials across multiple instances, avoiding manual re-authentication and scattered configs.

Core Features & Use Cases

  • Interactive login to GitLab instances with glab
  • View and verify current authentication status
  • Switch accounts or instances without reconfiguring manually
  • Configure Docker to use GitLab credentials for private registries
  • Troubleshoot authentication issues and maintain per-instance sessions

Quick Start

Use glab auth login to authenticate with a GitLab instance, then check status with glab auth status to confirm your session and use glab auth logout to switch or remove credentials.

Frequently Asked Questions about glab-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage GitLab CLI credentials across multiple instances?

Managing GitLab CLI credentials across multiple instances requires storing tokens in your global config. The glab auth command handles login, status checks, and account switching per instance without manual reconfiguration.

What is the best way to switch GitLab accounts using the CLI?

Switching GitLab accounts using the CLI is done by running glab auth login for the target instance and glab auth logout to remove previous credentials. This updates your stored config to point to the new account session.

Do I need the glab CLI installed to configure Docker for GitLab private registries?

Yes, you need the glab CLI installed to configure Docker for GitLab private registries. The authentication process uses glab to pass your GitLab credentials to Docker for accessing private registry images.

How does GitLab CLI authentication handle hostname variations?

GitLab CLI authentication handles hostname variations by mapping them within your global config during the login flow. This ensures tokens are correctly matched to their specific GitLab instances during status checks and API requests.

Can I use a browser-based flow for GitLab CLI login instead of a token?

Yes, you can use a browser-based flow for GitLab CLI login instead of a token. The glab auth login command supports interactive browser authentication to securely establish your session without manual token entry.

Why does my glab auth status show the wrong GitLab instance?

Your glab auth status showing the wrong GitLab instance indicates stale credentials in your global config. Running glab auth logout clears the current session, allowing you to log back in and verify the correct hostname.