blob: d02e2ead9f79d8e5a49756a85c2f1cdf12fa3f5a [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= gerrit create-group
Sasa Zivkov71963a52010-07-30 15:13:58 +02002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
Sasa Zivkov71963a52010-07-30 15:13:58 +02004gerrit create-group - Create a new account group.
5
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08006== SYNOPSIS
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08007--
Shawn O. Pearce47769242011-06-14 16:40:48 -07008'ssh' -p <port> <host> 'gerrit create-group'
Edwin Kempin73b26982012-07-16 13:53:22 +02009 [--owner <GROUP> | -o <GROUP>]
10 [--description <DESC> | -d <DESC>]
Shawn O. Pearce47769242011-06-14 16:40:48 -070011 [--member <USERNAME>]
12 [--group <GROUP>]
Mohamed Mansourb7dfb6c2012-03-02 14:49:26 -050013 [--visible-to-all]
Shawn O. Pearce47769242011-06-14 16:40:48 -070014 <GROUP>
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080015--
Sasa Zivkov71963a52010-07-30 15:13:58 +020016
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080017== DESCRIPTION
Sasa Zivkov71963a52010-07-30 15:13:58 +020018Creates a new account group. The group creating user (the user that
19fired the create-group command) is not automatically added to
20the created group. In case the creating user wants to be a member of
21the group he/she must list itself in the --member option. This is
22slightly different from Gerrit's Web UI where the creating user automatically
23becomes a member of the newly created group.
24
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080025== ACCESS
Shawn O. Pearce7f485142011-06-16 13:49:42 -070026Caller must be a member of the privileged 'Administrators' group,
Fredrik Luthander79d38152012-03-13 09:52:22 +010027or have been granted
28link:access-control.html#capability_createGroup[the 'Create Group' global capability].
Sasa Zivkov71963a52010-07-30 15:13:58 +020029
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080030== SCRIPTING
Sasa Zivkov71963a52010-07-30 15:13:58 +020031This command is intended to be used in scripts.
32
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080033== OPTIONS
Sasa Zivkov71963a52010-07-30 15:13:58 +020034<GROUP>::
35 Required; name of the new group.
36
Shawn O. Pearce47769242011-06-14 16:40:48 -070037--owner, -o::
Sasa Zivkov71963a52010-07-30 15:13:58 +020038 Name of the owning group. If not specified the group will be self-owning.
39
Shawn O. Pearce47769242011-06-14 16:40:48 -070040--description, -d::
Sasa Zivkov71963a52010-07-30 15:13:58 +020041 Description of group.
42+
43Description values containing spaces should be quoted in single quotes
Shawn O. Pearce47769242011-06-14 16:40:48 -070044('). This most likely requires double quoting the value, for example
45`--description "'A description string'"`.
Sasa Zivkov71963a52010-07-30 15:13:58 +020046
Shawn O. Pearce47769242011-06-14 16:40:48 -070047--member::
48 User name to become initial member of the group. Multiple --member
Sasa Zivkov71963a52010-07-30 15:13:58 +020049 options may be specified to add more initial members.
Edwin Kempin5f161ea2012-06-25 16:31:35 +020050+
51Trying to add a user that doesn't have an account in Gerrit fails,
52unless LDAP is used for authentication. If LDAP is used for
53authentication and the user is not found, Gerrit tries to authenticate
54the user against the LDAP backend. If the authentication is successful
55a user account is automatically created, so that the user can be added
56to the group.
Sasa Zivkov71963a52010-07-30 15:13:58 +020057
Shawn O. Pearce47769242011-06-14 16:40:48 -070058--group::
59 Group name to include in the group. Multiple --group options may
Matt Fischer620255a2011-03-22 14:28:23 -050060 be specified to include more initial groups.
61
Mohamed Mansourb7dfb6c2012-03-02 14:49:26 -050062--visible-to-all::
63 If specified, the group members will be visible to all users.
64
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080065== EXAMPLES
Sasa Zivkov71963a52010-07-30 15:13:58 +020066Create 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
73Create a new account group called `Foo` owned by the `Foo-admin` group.
74Put `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
80Note that it is necessary to quote the description twice. The local
81shell needs double quotes around the value to ensure the single quotes
82are passed through SSH as-is to the remote Gerrit server, which uses
83the single quotes to delimit the value.
84
85GERRIT
86------
87Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070088
89SEARCHBOX
90---------