lab icon indicating copy to clipboard operation
lab copied to clipboard

`lab token create` doesn't work on gitlab.com

Open claytonrcarter opened this issue 1 year ago • 0 comments

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.

claytonrcarter avatar May 13 '24 18:05 claytonrcarter