blob: 6a413c6ab2b5f010fdc57a2e9a46086808cd7a10 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= gerrit set-account
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +02002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +02004gerrit set-account - Change an account's settings.
5
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08006== SYNOPSIS
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08007--
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +02008set-account [--full-name <FULLNAME>] [--active|--inactive] \
9 [--add-email <EMAIL>] [--delete-email <EMAIL> | ALL] \
Khai Do635160f2014-07-23 14:50:49 -070010 [--preferred-email <EMAIL>] \
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020011 [--add-ssh-key - | <KEY>] \
Peter Jönssone402ea72012-09-04 22:09:29 +020012 [--delete-ssh-key - | <KEY> | ALL] \
David Ostrovskydb8dfae2014-07-23 02:38:32 +020013 [--http-password <PASSWORD>] \
14 [--clear-http-password] <USER>
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080015--
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020016
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080017== DESCRIPTION
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020018Modifies a given user's settings. This command can be useful to
Peter Jönssone402ea72012-09-04 22:09:29 +020019deactivate an account, set HTTP password, add/delete ssh keys without
20going through the UI.
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020021
22It also allows managing email addresses, which bypasses the
23verification step we force within the UI.
24
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080025== ACCESS
David Ostrovskyaa49e272014-07-22 00:55:47 +020026Caller must be a member of the privileged 'Administrators' group,
27or have been granted
28link:access-control.html#capability_modifyAccount[the 'Modify Account' global capability].
29
David Ostrovskydb8dfae2014-07-23 02:38:32 +020030To set the HTTP password for the user account (option --http-password) or
31to clear the HTTP password (option --clear-http-password) caller must be
32a member of the privileged 'Administrators' group, or have been granted
David Ostrovskyaa49e272014-07-22 00:55:47 +020033link:access-control.html#capability_generateHttpPassword[the 'Generate HTTP Password' global capability]
34in addition to 'Modify Account' global capability.
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020035
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080036== SCRIPTING
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020037This command is intended to be used in scripts.
38
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080039== OPTIONS
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020040<USER>::
41 Required; Full name, email-address, SSH username or account id.
42
43--full-name::
44 Display name of the user account.
45+
46Names containing spaces should be quoted in single quotes (').
47This most likely requires double quoting the value, for example
48`--full-name "'A description string'"`.
49
50--active::
51 Set the account state to be active.
52
53--inactive::
54 Set the account state to be inactive. This prevents the
55 user from logging in.
56
57--add-email::
58 Add another email to the user's account. This doesn't
59 trigger the mail validation and adds the email directly
60 to the user's account.
61 May be supplied more than once to add multiple emails to
62 an account in a single command execution.
63
64--delete-email::
65 Delete an email from this user's account if it exists.
66 If the email provided is 'ALL', all associated emails are
67 deleted from this account.
68 Maybe supplied more than once to remove multiple emails
69 from an account in a single command execution.
70
Khai Do635160f2014-07-23 14:50:49 -070071--preferred-email::
72 Sets the preferred email address for the user's account.
73 The email address must already have been registered
74 with the user's account before it can be set.
75 May be supplied with the delete-email option as long as
76 the emails are not the same.
77
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020078--add-ssh-key::
79 Content of the public SSH key to add to the account's
80 keyring. If `-` the key is read from stdin, rather than
81 from the command line.
82 May be supplied more than once to add multiple SSH keys
83 in a single command execution.
84
85--delete-ssh-key::
86 Content of the public SSH key to remove from the account's
87 keyring or the comment associated with this key.
88 If `-` the key is read from stdin, rather than from the
89 command line. If the key provided is 'ALL', all
90 associated SSH keys are removed from this account.
91 May be supplied more than once to delete multiple SSH
92 keys in a single command execution.
93
Peter Jönssone402ea72012-09-04 22:09:29 +020094--http-password::
95 Set the HTTP password for the user account.
96
David Ostrovskydb8dfae2014-07-23 02:38:32 +020097--clear-http-password::
98 Clear the HTTP password for the user account.
99
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800100== EXAMPLES
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +0200101Add an email and SSH key to `watcher`'s account:
102
103====
104 $ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit set-account --add-ssh-key - --add-email mail@example.com watcher
105====
106
107GERRIT
108------
109Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700110
111SEARCHBOX
112---------