Skip to content

lab token create doesn't work on gitlab.com #895

@claytonrcarter

Description

@claytonrcarter

My PATs are all expiring tomorrow, so – eager to try out the relatively new token create command – I tried:

❯ lab token create --expiresat 2025-05-13 --name 'Bot Token' --scopes api
2024/05/13 13:41:02 ERROR: token_create.go:74: POST https://gitlab.com/api/v4/users/111111/personal_access_tokens: 403 {message: 403 Forbidden}

It turns out that (if I understand correctly), this subcommand cannot work for gitlab.com, because:

Suggestion
It may be nice if this command errored early with a more helpful message when it's run in gitlab.com, perhaps with --force flag to allow it proceed in case you really do just need the k8s_proxy scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions