Skip to content

Commit 5703a0d

Browse files
lonix1delvh
andauthored
Document creating an API key from the CLI (#25504)
Related to #25503 --------- Co-authored-by: delvh <[email protected]>
1 parent 85bad22 commit 5703a0d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/content/doc/administration/command-line.en-us.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ Admin operations:
108108
- `--all`, `-A`: Force a password change for all users
109109
- `--exclude username`, `-e username`: Exclude the given user. Can be set multiple times.
110110
- `--unset`: Revoke forced password change for the given users
111+
- `generate-access-token`:
112+
- Options:
113+
- `--username value`, `-u value`: Username. Required.
114+
- `--token-name value`, `-t value`: Token name. Required.
115+
- `--scopes value`: Comma-separated list of scopes. Scopes follow the format `[read|write]:<block>` or `all` where `<block>` is one of the available visual groups you can see when opening the API page showing the available routes (for example `repo`).
116+
- Examples:
117+
- `gitea admin user generate-access-token --username myname --token-name mytoken`
118+
- `gitea admin user generate-access-token --help`
111119
- `regenerate`
112120
- Options:
113121
- `hooks`: Regenerate Git Hooks for all repositories

0 commit comments

Comments
 (0)