Skip to content
Snippets Groups Projects
Commit 778f8c36 authored by Mark van Holsteijn's avatar Mark van Holsteijn
Browse files

fix: documentation on create command

parent 7d0ab221
No related branches found
No related tags found
2 merge requests!1643feat: rotate personal, project or group access tokens,!1642feat: list personal, project or group access tokens
This commit is part of merge request !1643. Comments created here will be created in the context of that merge request.
......@@ -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) {
......
......@@ -23,7 +23,7 @@ By default it creates a project access token, unless the user or group name is s
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.
```plaintext
......@@ -50,10 +50,10 @@ glab token create --repo user/my-repo --access-level owner --scope api my-proje
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
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment