Skip to content

user

user create

user create <USERNAME> [OPTIONS]

Create a new user.

Arguments

USERNAME
Username of the user to create.
Type: text
Required:

Options

--password <PASSWORD>
Password for user.
Type: text

--email <EMAIL>
Email for user.
Type: text

--realname <REALNAME>
Real name of user. Enclose multiple names in quotes.
Type: text

--comment <COMMENT>
Comment for user.
Type: text


user delete

user delete <USERNAME_OR_ID> [OPTIONS]

Delete a user.

Arguments

USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:' to specify an ID.
Type: text
Required:

Options

--force
Force deletion without confirmation.
Type: boolean (flag)
Default: False


user get

user get <USERNAME_OR_ID>

Get information about a specific user.

Arguments

USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:' to specify an ID.
Type: text
Required:


user get-current

user get-current

Get information about the currently authenticated user.


user get-current-permissions

user get-current-permissions [OPTIONS]

Get permissions for the currently authenticated user.

Options

--scope <SCOPE>
Scope to get permissions for.
Type: text

--relative
Show permissions relative to scope.
Type: boolean (flag)
Default: False


user list

user list [OPTIONS]

List all users in the system.

Options

--query <QUERY>
Query parameters to filter the results.
See harborapi docs for more information.
Type: text

--sort <SORT>
Sort by field.
Type: choice
Choices: id, username, name

--page <PAGE>
(Advanced) Page to begin fetching from.
Type: integer
Default: 1

--page-size <PAGE_SIZE>
(Advanced) Results to fetch per API call.
Type: integer
Default: 10

--limit <LIMIT>
Maximum number of results to fetch.
Type: integer


user search <USERNAME> [OPTIONS]

Search for users by username.

Arguments

USERNAME
Username or partial username to search for.
Type: text
Required:

Options

--page <PAGE>
(Advanced) Page to begin fetching from.
Type: integer
Default: 1

--page-size <PAGE_SIZE>
(Advanced) Results to fetch per API call.
Type: integer
Default: 10

--limit <LIMIT>
Maximum number of results to fetch.
Type: integer


user set-admin

user set-admin <USERNAME_OR_ID>

Sets a user as admin.

Arguments

USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:' to specify an ID.
Type: text
Required:


user set-cli-secret

user set-cli-secret <USERNAME_OR_ID> --secret <SECRET>

Set a user's CLI secret.

Arguments

USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:' to specify an ID.
Type: text
Required:

Options

--secret <SECRET>
CLI secret to set for user. If omitted, a prompt will be shown.
Type: text
Required:


user set-password

user set-password <USERNAME_OR_ID> --old-password <OLD_PASSWORD> --new-password <NEW_PASSWORD>

Set a user's password.

Arguments

USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:' to specify an ID.
Type: text
Required:

Options

--old-password <OLD_PASSWORD>
Old password for user. Prompted if not provided.
Type: text
Required:

--new-password <NEW_PASSWORD>
New password for user. Prompted if not provided.
Type: text
Required:


user unset-admin

user unset-admin <USERNAME_OR_ID>

Unsets a user as admin.

Arguments

USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:' to specify an ID.
Type: text
Required:


user update

user update <USERNAME_OR_ID> [OPTIONS]

Update an existing user.

Arguments

USERNAME_OR_ID
Username or ID of the user to use. Prefix with 'id:' to specify an ID.
Type: text
Required:

Options

--email <EMAIL>
New email for the user.
Type: text

--realname <REALNAME>
New real name for the user.
Type: text

--comment <COMMENT>
New comment for the user.
Type: text