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