blob: 62bd0aa3288980f00d664ef95f6aca38bcbbd68a [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= gerrit create-account
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -07002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
David Pursehousec2683992013-08-24 12:04:52 +09004gerrit create-account - Create a new user account.
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -07005
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-account_
Shawn O. Pearce47769242011-06-14 16:40:48 -070010 [--group <GROUP>]
11 [--full-name <FULLNAME>]
12 [--email <EMAIL>]
13 [--ssh-key - | <KEY>]
Peter Jönssone402ea72012-09-04 22:09:29 +020014 [--http-password <PASSWORD>]
Shawn O. Pearce47769242011-06-14 16:40:48 -070015 <USERNAME>
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080016--
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070017
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080018== DESCRIPTION
David Pursehouse6d501d82013-05-07 14:37:29 +010019Creates a new internal-only user account.
20
21If the account is created without an email address, it may only be
22used for batch/role access, such as from an automated build system
23or event monitoring over link:cmd-stream-events.html[gerrit stream-events].
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070024
David Pursehousec2683992013-08-24 12:04:52 +090025Note, however, that in this case the account is not implicitly added
26to the 'Non-Interactive Users' group. The account must be explicitly
27added to the group with the `--group` option.
28
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070029If LDAP authentication is being used, the user account is created
30without checking the LDAP directory. Consequently users can be
31created in Gerrit that do not exist in the underlying LDAP directory.
32
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080033== ACCESS
Shawn O. Pearce7f485142011-06-16 13:49:42 -070034Caller must be a member of the privileged 'Administrators' group,
Fredrik Luthander79d38152012-03-13 09:52:22 +010035or have been granted
36link:access-control.html#capability_createAccount[the 'Create Account' global capability].
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070037
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080038== SCRIPTING
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070039This command is intended to be used in scripts.
40
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080041== OPTIONS
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070042<USERNAME>::
43 Required; SSH username of the user account.
44
Shawn O. Pearce47769242011-06-14 16:40:48 -070045--ssh-key::
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070046 Content of the public SSH key to load into the account's
47 keyring. If `-` the key is read from stdin, rather than
48 from the command line.
49
Shawn O. Pearce47769242011-06-14 16:40:48 -070050--group::
51 Name of the group to put the user into. Multiple --group
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070052 options may be specified to add the user to multiple groups.
53
Shawn O. Pearce47769242011-06-14 16:40:48 -070054--full-name::
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070055 Display name of the user account.
56+
Shawn O. Pearce47769242011-06-14 16:40:48 -070057Names containing spaces should be quoted in single quotes (').
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070058This most likely requires double quoting the value, for example
Shawn O. Pearce47769242011-06-14 16:40:48 -070059`--full-name "'A description string'"`.
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070060
Shawn O. Pearce47769242011-06-14 16:40:48 -070061--email::
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070062 Preferred email address for the user account.
63
Peter Jönssone402ea72012-09-04 22:09:29 +020064--http-password::
65 HTTP password for the user account.
66
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080067== EXAMPLES
David Pursehousec2683992013-08-24 12:04:52 +090068Create a new batch/role access user account called `watcher` in
69the 'Non-Interactive Users' group.
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070070
Michael Ochmannb99feab2016-07-06 14:10:22 +020071----
David Pursehousec2683992013-08-24 12:04:52 +090072 $ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit create-account --group "'Non-Interactive Users'" --ssh-key - watcher
Michael Ochmannb99feab2016-07-06 14:10:22 +020073----
Shawn O. Pearceb2ff7c82010-03-20 16:57:36 -070074
75GERRIT
76------
77Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070078
79SEARCHBOX
80---------