blob: f9855cdd9873c2ffb90808357c4e510d61b1f6da [file] [log] [blame]
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +02001gerrit set-account
2==================
3
4NAME
5----
6gerrit set-account - Change an account's settings.
7
8SYNOPSIS
9--------
10[verse]
11set-account [--full-name <FULLNAME>] [--active|--inactive] \
12 [--add-email <EMAIL>] [--delete-email <EMAIL> | ALL] \
13 [--add-ssh-key - | <KEY>] \
Peter Jönssone402ea72012-09-04 22:09:29 +020014 [--delete-ssh-key - | <KEY> | ALL] \
15 [--http-password <PASSWORD>] <USER>
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020016
17DESCRIPTION
18-----------
19Modifies a given user's settings. This command can be useful to
Peter Jönssone402ea72012-09-04 22:09:29 +020020deactivate an account, set HTTP password, add/delete ssh keys without
21going through the UI.
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020022
23It also allows managing email addresses, which bypasses the
24verification step we force within the UI.
25
26ACCESS
27------
28Caller must be a member of the privileged 'Administrators' group.
29
30SCRIPTING
31---------
32This command is intended to be used in scripts.
33
34OPTIONS
35-------
36<USER>::
37 Required; Full name, email-address, SSH username or account id.
38
39--full-name::
40 Display name of the user account.
41+
42Names containing spaces should be quoted in single quotes (').
43This most likely requires double quoting the value, for example
44`--full-name "'A description string'"`.
45
46--active::
47 Set the account state to be active.
48
49--inactive::
50 Set the account state to be inactive. This prevents the
51 user from logging in.
52
53--add-email::
54 Add another email to the user's account. This doesn't
55 trigger the mail validation and adds the email directly
56 to the user's account.
57 May be supplied more than once to add multiple emails to
58 an account in a single command execution.
59
60--delete-email::
61 Delete an email from this user's account if it exists.
62 If the email provided is 'ALL', all associated emails are
63 deleted from this account.
64 Maybe supplied more than once to remove multiple emails
65 from an account in a single command execution.
66
67--add-ssh-key::
68 Content of the public SSH key to add to the account's
69 keyring. If `-` the key is read from stdin, rather than
70 from the command line.
71 May be supplied more than once to add multiple SSH keys
72 in a single command execution.
73
74--delete-ssh-key::
75 Content of the public SSH key to remove from the account's
76 keyring or the comment associated with this key.
77 If `-` the key is read from stdin, rather than from the
78 command line. If the key provided is 'ALL', all
79 associated SSH keys are removed from this account.
80 May be supplied more than once to delete multiple SSH
81 keys in a single command execution.
82
Peter Jönssone402ea72012-09-04 22:09:29 +020083--http-password::
84 Set the HTTP password for the user account.
85
Deniz Turkoglu2c4bbcf2012-04-13 15:26:01 +020086EXAMPLES
87--------
88Add an email and SSH key to `watcher`'s account:
89
90====
91 $ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit set-account --add-ssh-key - --add-email mail@example.com watcher
92====
93
94GERRIT
95------
96Part of link:index.html[Gerrit Code Review]