blob: 2ba611c0ea76dec0c6f52027abb8fe7a29ead8ea [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
Michael Ochmanne2d76a12016-06-23 17:07:37 +02007[verse]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08008--
Michael Ochmanne2d76a12016-06-23 17:07:37 +02009_ssh_ -p <port> <host> _gerrit create-group_
Edwin Kempin73b26982012-07-16 13:53:22 +020010 [--owner <GROUP> | -o <GROUP>]
11 [--description <DESC> | -d <DESC>]
Shawn O. Pearce47769242011-06-14 16:40:48 -070012 [--member <USERNAME>]
13 [--group <GROUP>]
Mohamed Mansourb7dfb6c2012-03-02 14:49:26 -050014 [--visible-to-all]
Shawn O. Pearce47769242011-06-14 16:40:48 -070015 <GROUP>
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080016--
Sasa Zivkov71963a52010-07-30 15:13:58 +020017
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080018== DESCRIPTION
Sasa Zivkov71963a52010-07-30 15:13:58 +020019Creates a new account group. The group creating user (the user that
20fired the create-group command) is not automatically added to
21the created group. In case the creating user wants to be a member of
22the group he/she must list itself in the --member option. This is
23slightly different from Gerrit's Web UI where the creating user automatically
24becomes a member of the newly created group.
25
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080026== ACCESS
Shawn O. Pearce7f485142011-06-16 13:49:42 -070027Caller must be a member of the privileged 'Administrators' group,
Fredrik Luthander79d38152012-03-13 09:52:22 +010028or have been granted
29link:access-control.html#capability_createGroup[the 'Create Group' global capability].
Sasa Zivkov71963a52010-07-30 15:13:58 +020030
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080031== SCRIPTING
Sasa Zivkov71963a52010-07-30 15:13:58 +020032This command is intended to be used in scripts.
33
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080034== OPTIONS
Sasa Zivkov71963a52010-07-30 15:13:58 +020035<GROUP>::
36 Required; name of the new group.
37
Shawn O. Pearce47769242011-06-14 16:40:48 -070038--owner, -o::
Sasa Zivkov71963a52010-07-30 15:13:58 +020039 Name of the owning group. If not specified the group will be self-owning.
40
Shawn O. Pearce47769242011-06-14 16:40:48 -070041--description, -d::
Sasa Zivkov71963a52010-07-30 15:13:58 +020042 Description of group.
43+
44Description values containing spaces should be quoted in single quotes
Shawn O. Pearce47769242011-06-14 16:40:48 -070045('). This most likely requires double quoting the value, for example
46`--description "'A description string'"`.
Sasa Zivkov71963a52010-07-30 15:13:58 +020047
Shawn O. Pearce47769242011-06-14 16:40:48 -070048--member::
49 User name to become initial member of the group. Multiple --member
Sasa Zivkov71963a52010-07-30 15:13:58 +020050 options may be specified to add more initial members.
Edwin Kempin5f161ea2012-06-25 16:31:35 +020051+
52Trying to add a user that doesn't have an account in Gerrit fails,
53unless LDAP is used for authentication. If LDAP is used for
54authentication and the user is not found, Gerrit tries to authenticate
55the user against the LDAP backend. If the authentication is successful
56a user account is automatically created, so that the user can be added
57to the group.
Sasa Zivkov71963a52010-07-30 15:13:58 +020058
Shawn O. Pearce47769242011-06-14 16:40:48 -070059--group::
60 Group name to include in the group. Multiple --group options may
Matt Fischer620255a2011-03-22 14:28:23 -050061 be specified to include more initial groups.
62
Mohamed Mansourb7dfb6c2012-03-02 14:49:26 -050063--visible-to-all::
64 If specified, the group members will be visible to all users.
65
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080066== EXAMPLES
Sasa Zivkov71963a52010-07-30 15:13:58 +020067Create a new account group called `gerritdev` with two initial members
68`developer1` and `developer2`. The group should be owned by itself:
69
Michael Ochmannb99feab2016-07-06 14:10:22 +020070----
David Shevitza6afd0f2018-09-24 09:48:23 -070071$ ssh -p 29418 user@review.example.com gerrit create-group --member developer1 --member developer2 gerritdev
Michael Ochmannb99feab2016-07-06 14:10:22 +020072----
Sasa Zivkov71963a52010-07-30 15:13:58 +020073
74Create a new account group called `Foo` owned by the `Foo-admin` group.
75Put `developer1` as the initial member and include group description:
76
Michael Ochmannb99feab2016-07-06 14:10:22 +020077----
David Shevitza6afd0f2018-09-24 09:48:23 -070078$ ssh -p 29418 user@review.example.com gerrit create-group --owner Foo-admin --member developer1 --description "'Foo description'" Foo
Michael Ochmannb99feab2016-07-06 14:10:22 +020079----
Sasa Zivkov71963a52010-07-30 15:13:58 +020080
81Note that it is necessary to quote the description twice. The local
82shell needs double quotes around the value to ensure the single quotes
83are passed through SSH as-is to the remote Gerrit server, which uses
84the single quotes to delimit the value.
85
86GERRIT
87------
88Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070089
90SEARCHBOX
91---------