Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = gerrit create-group |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == NAME |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 4 | gerrit create-group - Create a new account group. |
| 5 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6 | == SYNOPSIS |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 7 | [verse] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 8 | -- |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 9 | _ssh_ -p <port> <host> _gerrit create-group_ |
Edwin Kempin | 73b2698 | 2012-07-16 13:53:22 +0200 | [diff] [blame] | 10 | [--owner <GROUP> | -o <GROUP>] |
| 11 | [--description <DESC> | -d <DESC>] |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 12 | [--member <USERNAME>] |
| 13 | [--group <GROUP>] |
Mohamed Mansour | b7dfb6c | 2012-03-02 14:49:26 -0500 | [diff] [blame] | 14 | [--visible-to-all] |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 15 | <GROUP> |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 16 | -- |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 17 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 18 | == DESCRIPTION |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 19 | Creates a new account group. The group creating user (the user that |
| 20 | fired the create-group command) is not automatically added to |
| 21 | the created group. In case the creating user wants to be a member of |
| 22 | the group he/she must list itself in the --member option. This is |
| 23 | slightly different from Gerrit's Web UI where the creating user automatically |
| 24 | becomes a member of the newly created group. |
| 25 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 26 | == ACCESS |
Shawn O. Pearce | 7f48514 | 2011-06-16 13:49:42 -0700 | [diff] [blame] | 27 | Caller must be a member of the privileged 'Administrators' group, |
Fredrik Luthander | 79d3815 | 2012-03-13 09:52:22 +0100 | [diff] [blame] | 28 | or have been granted |
| 29 | link:access-control.html#capability_createGroup[the 'Create Group' global capability]. |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 30 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 31 | == SCRIPTING |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 32 | This command is intended to be used in scripts. |
| 33 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 34 | == OPTIONS |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 35 | <GROUP>:: |
| 36 | Required; name of the new group. |
| 37 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 38 | --owner, -o:: |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 39 | Name of the owning group. If not specified the group will be self-owning. |
| 40 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 41 | --description, -d:: |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 42 | Description of group. |
| 43 | + |
| 44 | Description values containing spaces should be quoted in single quotes |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 45 | ('). This most likely requires double quoting the value, for example |
| 46 | `--description "'A description string'"`. |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 47 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 48 | --member:: |
| 49 | User name to become initial member of the group. Multiple --member |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 50 | options may be specified to add more initial members. |
Edwin Kempin | 5f161ea | 2012-06-25 16:31:35 +0200 | [diff] [blame] | 51 | + |
| 52 | Trying to add a user that doesn't have an account in Gerrit fails, |
| 53 | unless LDAP is used for authentication. If LDAP is used for |
| 54 | authentication and the user is not found, Gerrit tries to authenticate |
| 55 | the user against the LDAP backend. If the authentication is successful |
| 56 | a user account is automatically created, so that the user can be added |
| 57 | to the group. |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 58 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 59 | --group:: |
| 60 | Group name to include in the group. Multiple --group options may |
Matt Fischer | 620255a | 2011-03-22 14:28:23 -0500 | [diff] [blame] | 61 | be specified to include more initial groups. |
| 62 | |
Mohamed Mansour | b7dfb6c | 2012-03-02 14:49:26 -0500 | [diff] [blame] | 63 | --visible-to-all:: |
| 64 | If specified, the group members will be visible to all users. |
| 65 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 66 | == EXAMPLES |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 67 | Create a new account group called `gerritdev` with two initial members |
| 68 | `developer1` and `developer2`. The group should be owned by itself: |
| 69 | |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 70 | ---- |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 71 | $ ssh -p 29418 user@review.example.com gerrit create-group --member developer1 --member developer2 gerritdev |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 72 | ---- |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 73 | |
| 74 | Create a new account group called `Foo` owned by the `Foo-admin` group. |
| 75 | Put `developer1` as the initial member and include group description: |
| 76 | |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 77 | ---- |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 78 | $ ssh -p 29418 user@review.example.com gerrit create-group --owner Foo-admin --member developer1 --description "'Foo description'" Foo |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 79 | ---- |
Sasa Zivkov | 71963a5 | 2010-07-30 15:13:58 +0200 | [diff] [blame] | 80 | |
| 81 | Note that it is necessary to quote the description twice. The local |
| 82 | shell needs double quotes around the value to ensure the single quotes |
| 83 | are passed through SSH as-is to the remote Gerrit server, which uses |
| 84 | the single quotes to delimit the value. |
| 85 | |
| 86 | GERRIT |
| 87 | ------ |
| 88 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 89 | |
| 90 | SEARCHBOX |
| 91 | --------- |