{
  "slug": "glab-artifact-registry-login-adds-gradle-npm-sbt-and-maven-options-1a89d6725bde",
  "title": "glab artifact-registry login adds Gradle, npm, sbt, and Maven options",
  "tools": [
    "glab"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-25T20:39:43.089Z",
  "announced_at": "2026-08-25T20:39:43.089Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When authenticating a project to GitLab Artifact Registry, run `glab artifact-registry login` with the registry URL and the option for its package manager: `--gradle`, `--npm`, `--sbt`, or `--maven`. [GitLab CLI docs](https://docs.gitlab.com/cli/artifact-registry/login/)",
    "examples": [
      "glab artifact-registry login --gradle --registry <repository_url>",
      "glab artifact-registry login --npm --registry <repository_url>",
      "glab artifact-registry login --sbt --registry <repository_url>"
    ],
    "gotchas": [
      "Version: v1.115.0",
      "--gradle (required): Select Gradle; writes credentials to `~/.gradle/gradle.properties`.",
      "--npm (required): Select npm; writes an auth-token entry to `~/.npmrc`.",
      "--sbt (required): Select sbt; writes a credentials line to `~/.sbt/1.0/credentials.sbt`.",
      "--maven (required): Select Maven; writes a server block to `~/.m2/settings.xml`.",
      "--registry <repository_url> (required): Registry repository URL to authenticate against; typically a URL for non-Docker clients.",
      "--registry-alias <alias>: Maven/Gradle only: alias or ID for the registry; defaults to a name derived from the registry. Maven's repository ID must match the alias. For Gradle, use a valid build-script identifier.",
      "--duration <duration>: Requested token lifetime; default 15 minutes, maximum 12 hours. Re-run login before it expires.",
      "--hostname <hostname>: GitLab hostname to request the token from; defaults to the configured GitLab instance.",
      "Prerequisite: Install glab version 1.115.0 or later.",
      "Prerequisite: Authenticate glab: it uses `GITLAB_TOKEN` when set, otherwise credentials stored by `glab auth login`."
    ]
  },
  "why_it_matters": "Authenticate glab to the artifact registry for a project using Gradle, npm, sbt, or Maven.",
  "sources": [
    "https://gitlab.com/gitlab-org/cli/-/releases/v1.115.0",
    "https://docs.gitlab.com/artifact-registry/formats/maven/",
    "https://docs.gitlab.com/artifact-registry/formats/npm/",
    "https://docs.gitlab.com/cli/artifact-registry/login/",
    "https://docs.gitlab.com/artifact-registry/authenticate/"
  ],
  "rank": 0.9602,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-ca4b3b5702e10b8c-0:gate",
    "evidence_hash": "a3c9cba3b1c47c3d637be3de6c36c23c040b1a39540d087673bfe6df2da4f794"
  },
  "review": {
    "draft_hash": "6c6bbdc0d7ef3b41c8559fbf2232962c23e5747b7d9e8ed499917d70caed07a3",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
