Skip to content
Snippets Groups Projects

feat: rotate personal, project or group access tokens

1 unresolved thread
2 files
+ 6
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -56,7 +56,7 @@ func NewCmdCreate(f *cmdutils.Factory, runE func(opts *CreateOptions) error) *co
date of the token will be calculated by adding the duration (default 30 days) to the current date.
Alternatively you can specify a different duration or an explicit end date.
Normal users can only create personal access tokens for themselves (@me) with the scope k8s_scope.
Normal users can only create personal access tokens for themselves (@me) with the scope k8s_proxy.
Administrators can create full featured personal access tokens for themselves and for the users.
`),
Example: heredoc.Doc(`
@@ -70,10 +70,10 @@ func NewCmdCreate(f *cmdutils.Factory, runE func(opts *CreateOptions) error) *co
glab token create --group group/sub-group --access-level owner --scope api my-group-token
# create a personal access token for current user
glab token create --user @me --scope k8s_scope my-personal-token
glab token create --user @me --scope k8s_proxy my-personal-token
# create a personal access token for another user (can only be done by an administrator)
glab token create --user johndoe --scope k8s_scope johns-personal-token
glab token create --user johndoe --scope api johns-personal-token
`),
RunE: func(cmd *cobra.Command, args []string) (err error) {
Loading