Logo van Glab Artifact Registry

Glab Artifact Registry

Community
vince-winkintel
glab-artifact-registry

Wissel GitLab-inloggegevens in voor tijdelijke Artifact Registry-tokens, controleer de tokenidentiteit en configureer authenticatie voor pakketbeheerders met glab. Gebruik dit om toegang tot GitLab Artifact Registry te controleren, een tijdelijke registry-token op te halen of Docker, Maven, Gradle, npm, Yarn of sbt te configureren voor een GitLab Artifact Registry. Wordt geactiveerd bij artifact registry, glab artifact-registry, glab ar, get-token, token exchange, registry access status, artifact-registry login, Docker credential helper, Maven registry, Gradle registry, npm auth, sbt credentials.

Overzicht

Uitgevervince-winkintel
Repositorygitlab-cli-skills
Skillnaamglab-artifact-registry
Sterren
50
Forks
6
Meegeleverde bestanden
1
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 1

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door vince-winkintel op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Glab Artifact Registry in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/vince-winkintel/gitlab-cli-skills/tree/main/glab-artifact-registry
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vince-winkintel/gitlab-cli-skills.git /tmp/gitlab-cli-skills
mkdir -p .claude/skills
cp -r /tmp/gitlab-cli-skills/glab-artifact-registry .claude/skills/glab-artifact-registry
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Glab Artifact Registry in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Glab Artifact Registry automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Glab Artifact Registry niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

glab artifact-registry

Exchange the active GitLab credential for a short-lived Artifact Registry access token. The command group also accepts the glab ar alias. This command group is experimental; verify live help and the target GitLab instance before using it in durable automation.

Maven and sbt destination files

login --config-file <path> applies only to --maven or --sbt; other package-manager modes reject it, as does an explicitly empty path. It writes only that file, leaving the default destinations alone. Approve the token exchange and exact destination before running login; these files contain a live credential and must stay outside repositories and logs. A project-specific Maven settings file must also be selected by the consuming build, for example with Maven's --settings option. For sbt with -Dsbt.global.base, select the credentials.sbt file inside that actual base.

Without --config-file, sbt writes ~/.sbt/1.0/credentials.sbt plus <base>/2/credentials.sbt. For sbt 2.x, <base> uses the first valid absolute override: SBT_CONFIG_HOME, then XDG_CONFIG_HOME/sbt on macOS/Linux or %LOCALAPPDATA%\sbt on Windows, then ~/.config/sbt as the fallback. On Windows, glab uses LOCALAPPDATA instead of XDG_CONFIG_HOME; it does not consult XDG_CONFIG_HOME for this base. Blank or relative overrides are skipped with a warning because sbt can resolve them differently. On Windows, absolute LOCALAPPDATA also gets sbt/credentials.sbt for the sbt 2.x batch launcher. Inspect every reported destination: a later write can fail after an earlier file already received the token.

Credentials use realm artifact-registry, username __token__, and the lowercased hostname without its port. Existing matching active entries are refreshed. An already-running sbt shell/server keeps its old credentials until reload or sbt shutdown; refresh the token and reload before retrying an expired-token build.

bash
# After approving the exchange and the destination outside version control
glab artifact-registry login --maven --registry https://ar.example.com \
  --registry-alias gitlab-ar --config-file /secure/build-settings.xml
glab artifact-registry login --sbt --registry https://ar.example.com \
  --config-file /secure/sbt-global/credentials.sbt

Prerequisites

  • GitLab Enterprise Edition 19.1 or later.
  • The instance administrator enabled the gate_token_exchange_endpoint feature flag.
  • glab is authenticated to the intended hostname.

The token is ephemeral but still a credential. Never print it in logs, store it in a repository, include it in command arguments, or paste it into issue/MR content.

Check access first

status performs the token exchange and prints non-secret identity metadata: issuer, subject, audience, and expiry. Each check mints and immediately discards a server-side token; prefer JSON for automation and do not call it in a tight loop.

bash
glab artifact-registry status --hostname gitlab.example.com --output json

# Extract only non-secret expiry metadata
glab artifact-registry status \
  --hostname gitlab.example.com \
  --output json \
  --jq '.expires_at'

Confirm that the issuer, subject, and audience identify the intended instance, actor, and registry before requesting a token for another process.

Request a short-lived token

Text output is the bare token on stdout so a shell can capture or pipe it. Default duration is 15 minutes; accepted durations range from 1 second through 12 hours. Use the shortest duration that covers the operation.

bash
# Avoid command tracing and keep the token only in a process-local variable
set +x
artifact_token="$(glab artifact-registry get-token \
  --hostname gitlab.example.com \
  --duration 15m)"

# Feed via stdin, not as a command-line argument. Obtain the registry host and
# required username from the target registry's documentation or administrator.
printf '%s' "$artifact_token" | \
  docker login <artifact-registry-host> \
    --username '<registry-username>' \
    --password-stdin
unset artifact_token

Use --output json only when a consumer also needs the expiry. Treat the JSON document as secret because it contains the token. Do not pass --jq expressions that print the token into logs.

Configure package-manager authentication

glab artifact-registry login configures exactly one package manager per run:

  • --docker installs the docker-credential-glab shim and registers glab under Docker's per-registry credHelpers.
  • --maven writes a <server> block to ~/.m2/settings.xml, keyed by --registry-alias; the consuming <repository> must use the same <id>.
  • --gradle writes {alias}Url, {alias}Username, and {alias}Password to ~/.gradle/gradle.properties, where {alias} is --registry-alias.
  • --npm writes a //{host}{path}/:_authToken entry to ~/.npmrc; you must still configure registry= or @scope:registry= to point npm at the registry.
  • --yarn configures Yarn 2 or later in ~/.yarnrc.yml: an npmRegistries entry holds npmAuthToken and npmAlwaysAuth. Set a matching npmRegistryServer separately. For Yarn 1 use --npm. Existing npmScopes credentials can override the registry token; inspect the warning and review the scope before changing it. Rewriting YAML can change formatting.
  • --sbt writes credentials for both sbt 1.x and 2.x; see destination and reload rules above. --config-file selects one file instead.
bash
# Show only the destination path, then check the stored GitLab identity
printf 'Docker config: %s\n' "${DOCKER_CONFIG:-$HOME/.docker}/config.json"
glab auth status --hostname gitlab.example.com

# Configure only the verified Artifact Registry hostname
glab artifact-registry login \
  --hostname gitlab.example.com \
  --docker \
  --registry registry.example.com

# Configure Maven for a two-hour token
glab artifact-registry login \
  --hostname gitlab.example.com \
  --maven \
  --registry https://ar.example.com \
  --registry-alias gitlab-ar \
  --duration 2h

Safety and compatibility rules:

  • For --docker, --registry must be a bare hostname, optionally with a port. For Maven, Gradle, npm, Yarn, and sbt, --registry is typically a URL.
  • Docker exchanges a fresh token for every pull or push, so --duration does not apply. Maven, Gradle, npm, Yarn, and sbt receive one static token; rerun the command before --duration elapses.
  • The Docker helper subprocess intentionally ignores GITLAB_TOKEN. It normally reads a token stored by glab auth login; inside a GitLab CI job, it also honors CI_JOB_TOKEN when CI auto-login is enabled with GLAB_ENABLE_CI_AUTOLOGIN=true. Maven, Gradle, npm, Yarn, and sbt login paths can read GITLAB_TOKEN because glab writes the exchanged token into each tool's config file.
  • Use this only for a registry actually backed by GitLab Artifact Registry. Misclassifying a normal container registry can make every pull fail because an exchanged Artifact Registry token takes precedence.
  • Review the destination config path before writing: ${DOCKER_CONFIG:-$HOME/.docker}/config.json, ~/.m2/settings.xml, ~/.gradle/gradle.properties, ~/.npmrc, ~/.yarnrc.yml, or the sbt destination files listed above (or the explicit --config-file).
  • --registry-alias applies only to Maven and Gradle. For Gradle, choose an alias that is a valid identifier in the build script; the derived default can contain hyphens.
  • Re-running the command for the same registry refreshes or replaces the matching entry. After configuration, test a non-destructive package-manager operation against the intended host without printing credentials.

Troubleshooting

  • Unsupported or not found: verify GitLab EE 19.1+ and the gate_token_exchange_endpoint feature flag with the instance administrator.
  • Wrong issuer/subject/audience: stop; re-check --hostname, environment-token precedence, and glab auth status --hostname <host>.
  • Duration rejected: use a Go-style duration between 1s and 12h.
  • Expired token: request a new short-lived token; do not persist or attempt to refresh the old one.
  • Stored-token error during Docker setup: run glab auth login --hostname <host>; an environment-only token is not used by the Docker helper.
  • Credential-helper conflict: use the status-only Docker diagnostic in glab-auth for the exact registry key. The config path is ${DOCKER_CONFIG:-$HOME/.docker}/config.json. Do not display the file or raw helper values in agent output, logs, or chat. Keep the current helper unless the operator explicitly approves a migration. If this standalone install lacks glab-auth, Python 3, or a Bash-compatible shell, stop the optional diagnostic; do not fall back to displaying configuration or credential-helper output. Ask the operator to inspect the selected registry privately and report only glab, glab-cli, not configured, or different helper configured. Keep any backup private and outside the repository.
  • Build tool still unauthenticated: verify the tool reads the file that glab artifact-registry login wrote, and that its registry URL or repository ID matches the written key.

See references/commands.md for captured command help.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Glab Artifact Registry?

Wissel GitLab-inloggegevens in voor tijdelijke Artifact Registry-tokens, controleer de tokenidentiteit en configureer authenticatie voor pakketbeheerders met glab. Gebruik dit om toegang tot GitLab Artifact Registry te controleren, een tijdelijke registry-token op te halen of Docker, Maven, Gradle, npm, Yarn of sbt te configureren voor een GitLab Artifact Registry. Wordt geactiveerd bij artifact registry, glab artifact-registry, glab ar, get-token, token exchange, registry access status, artifact-registry login, Docker credential helper, Maven registry, Gradle registry, npm auth, sbt creden...

Waarom Glab Artifact Registry gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Glab Artifact Registry bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Glab Artifact Registry in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/vince-winkintel/gitlab-cli-skills/tree/main/glab-artifact-registry. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Glab Artifact Registry gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Glab Artifact Registry gebruiken?

Zoveel als je wilt. Je kunt Glab Artifact Registry gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Glab Artifact Registry gratis?

Ja. Deze skill is door vince-winkintel op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇