Skip to content

Does glab (glab-cli) Support Creating Project Access Tokens? Current Status and Workarounds

In the context of GitLab, where CI pipelines don’t allow pushing with only CI_JOB_TOKEN, one might consider using project access tokens for necessary write permissions. This guide explores whether glab-cli can help create these required Project Access Tokens (PATs) and offers current alternatives if it doesn’t support this outright yet.

Current Status with glab

The functionality to generate PATs directly through the CLI hasn’t been implemented in gitlab:ci as of now, but there are active discussions aimed at enhancing glab-cli for such tasks:

  1. Create Project Access Tokens - A suggestion has popped up indicating a need and potential feature request Issue #980.
  2. Rotate PATs – Another pertinent issue that suggests adding this capability to the CLI, found at Issue #7435, for easier management of access tokens over time or when security policies change.

These issues hint towards a growing interest in streamlining token operations through glab as well, pointing to its evolution and increasing utility among users who require more extensive permission handling within GitLab environments via the CLI interface.

Alternate Workarounds

Meanwhile, if immediate generation of PATs is not an option for you:

These alternative routes show that the community is actively working on refining and extending glab’s capabilities, which include not just simple token generation but also robustness in handling related procedures as per GitLab’s security protocol. The outcomes of these discussions are expected to inform future developments for glab.

For further guidance or updates regarding this topic within the gitlab-org community and glab developers, keep an eye on the linked issues where they might be resolved in due course.


Previous Post
Custom Rule Issues in Azure DevOps Services Enfor
Next Post
How to Delete Terraform Assets and Statefiles in a