gerrit ls-groups - List groups visible to caller
Displays the list of group names, one per line, that are visible to the account of the calling user.
If the caller is a member of the privileged Administrators group, all groups are listed.
Any user who has configured an SSH key.
This command is intended to be used in scripts.
Name of the project for which the groups should be listed. Only groups are listed for which any permission is set on this project (or for which a permission is inherited from a parent project). Multiple --project options may be specified to specify additional projects. In this case all groups are listed that have a permission for any of the specified projects.
This option can’t be used together with the --user option.
User for which the groups should be listed. Only groups are listed that contain this user as a member.
The calling user can list the groups for the own user or must be a member of the privileged Administrators group to list the groups for other users.
This option can’t be used together with the --project option.
Displays only groups that are visible to all registered users (groups that are explicitly marked as visible to all registered users).
Display only groups of the specified type. If not specified, groups of all types are displayed. Supported types:
Any group defined within Gerrit.
Any group defined by an external LDAP database.
Any system defined and managed group.
List visible groups:
$ ssh -p 29418 review.example.com gerrit ls-groups Administrators Anonymous Users MyProject_Committers Project Owners Registered Users
List all groups for which any permission is set for the project "MyProject":
$ ssh -p 29418 review.example.com gerrit ls-groups --project MyProject MyProject_Committers Project Owners Registered Users
Part of Gerrit Code Review