Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = gerrit set-account |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == NAME |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 4 | gerrit set-account - Change an account's settings. |
| 5 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6 | == SYNOPSIS |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 7 | -- |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 8 | set-account [--full-name <FULLNAME>] [--active|--inactive] \ |
| 9 | [--add-email <EMAIL>] [--delete-email <EMAIL> | ALL] \ |
Khai Do | 635160f | 2014-07-23 14:50:49 -0700 | [diff] [blame^] | 10 | [--preferred-email <EMAIL>] \ |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 11 | [--add-ssh-key - | <KEY>] \ |
Peter Jönsson | e402ea7 | 2012-09-04 22:09:29 +0200 | [diff] [blame] | 12 | [--delete-ssh-key - | <KEY> | ALL] \ |
David Ostrovsky | db8dfae | 2014-07-23 02:38:32 +0200 | [diff] [blame] | 13 | [--http-password <PASSWORD>] \ |
| 14 | [--clear-http-password] <USER> |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 15 | -- |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 16 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 17 | == DESCRIPTION |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 18 | Modifies a given user's settings. This command can be useful to |
Peter Jönsson | e402ea7 | 2012-09-04 22:09:29 +0200 | [diff] [blame] | 19 | deactivate an account, set HTTP password, add/delete ssh keys without |
| 20 | going through the UI. |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 21 | |
| 22 | It also allows managing email addresses, which bypasses the |
| 23 | verification step we force within the UI. |
| 24 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 25 | == ACCESS |
David Ostrovsky | aa49e27 | 2014-07-22 00:55:47 +0200 | [diff] [blame] | 26 | Caller must be a member of the privileged 'Administrators' group, |
| 27 | or have been granted |
| 28 | link:access-control.html#capability_modifyAccount[the 'Modify Account' global capability]. |
| 29 | |
David Ostrovsky | db8dfae | 2014-07-23 02:38:32 +0200 | [diff] [blame] | 30 | To set the HTTP password for the user account (option --http-password) or |
| 31 | to clear the HTTP password (option --clear-http-password) caller must be |
| 32 | a member of the privileged 'Administrators' group, or have been granted |
David Ostrovsky | aa49e27 | 2014-07-22 00:55:47 +0200 | [diff] [blame] | 33 | link:access-control.html#capability_generateHttpPassword[the 'Generate HTTP Password' global capability] |
| 34 | in addition to 'Modify Account' global capability. |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 35 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 36 | == SCRIPTING |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 37 | This command is intended to be used in scripts. |
| 38 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 39 | == OPTIONS |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 40 | <USER>:: |
| 41 | Required; Full name, email-address, SSH username or account id. |
| 42 | |
| 43 | --full-name:: |
| 44 | Display name of the user account. |
| 45 | + |
| 46 | Names containing spaces should be quoted in single quotes ('). |
| 47 | This 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 Do | 635160f | 2014-07-23 14:50:49 -0700 | [diff] [blame^] | 71 | --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 Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 78 | --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önsson | e402ea7 | 2012-09-04 22:09:29 +0200 | [diff] [blame] | 94 | --http-password:: |
| 95 | Set the HTTP password for the user account. |
| 96 | |
David Ostrovsky | db8dfae | 2014-07-23 02:38:32 +0200 | [diff] [blame] | 97 | --clear-http-password:: |
| 98 | Clear the HTTP password for the user account. |
| 99 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 100 | == EXAMPLES |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 101 | Add 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 | |
| 107 | GERRIT |
| 108 | ------ |
| 109 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 110 | |
| 111 | SEARCHBOX |
| 112 | --------- |