From c114eebd9dae412492a2c207133d7becd8e75183 Mon Sep 17 00:00:00 2001 From: lonix1 <40320097+lonix1@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:13:15 +0200 Subject: [PATCH 1/2] Docs: Create API key via CLI --- docs/content/doc/administration/command-line.en-us.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/content/doc/administration/command-line.en-us.md b/docs/content/doc/administration/command-line.en-us.md index 37ba0c04da61b..ea4ca326e5036 100644 --- a/docs/content/doc/administration/command-line.en-us.md +++ b/docs/content/doc/administration/command-line.en-us.md @@ -108,6 +108,14 @@ Admin operations: - `--all`, `-A`: Force a password change for all users - `--exclude username`, `-e username`: Exclude the given user. Can be set multiple times. - `--unset`: Revoke forced password change for the given users + - `generate-access-token`: + - Options: + - `--username value`, `-u value`: Username. Required. + - `--token-name value`, `-t value`: Token name. Required. + - `--scopes value`: Comma-separated list of scopes. + - Examples: + - `gitea admin user generate-access-token --username myname --token-name mytoken` + - `gitea admin user generate-access-token --help` - `regenerate` - Options: - `hooks`: Regenerate Git Hooks for all repositories From e99a7cfc99abe269d2b3bb9f112c811b8a10a4f7 Mon Sep 17 00:00:00 2001 From: lonix1 <40320097+lonix1@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:18:17 +0200 Subject: [PATCH 2/2] Update docs/content/doc/administration/command-line.en-us.md Co-authored-by: delvh --- docs/content/doc/administration/command-line.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/doc/administration/command-line.en-us.md b/docs/content/doc/administration/command-line.en-us.md index ea4ca326e5036..d7e74ee24df98 100644 --- a/docs/content/doc/administration/command-line.en-us.md +++ b/docs/content/doc/administration/command-line.en-us.md @@ -112,7 +112,7 @@ Admin operations: - Options: - `--username value`, `-u value`: Username. Required. - `--token-name value`, `-t value`: Token name. Required. - - `--scopes value`: Comma-separated list of scopes. + - `--scopes value`: Comma-separated list of scopes. Scopes follow the format `[read|write]:` or `all` where `` is one of the available visual groups you can see when opening the API page showing the available routes (for example `repo`). - Examples: - `gitea admin user generate-access-token --username myname --token-name mytoken` - `gitea admin user generate-access-token --help`