Skip to content

Ability to update email using the CLI #2175

Open
@TobyGiacometti

Description

@TobyGiacometti

Welcome

  • Yes, I've searched similar issues on GitHub and didn't find any.

How do you use lego?

Binary

Detailed Description

It would be great if the email update functionality (#1002) could be exposed through the CLI. The interface could look as follows:

NAME:
   lego account - Update account information.

USAGE:
   lego account [command options] [arguments...]

OPTIONS:
   --account value, -a value  Email of the account that should be updated.
   --email value, -m value    New email for the account.
   --help, -h                 show help

While I would prefer to use an interface that makes use of positional arguments for required parameters, the interface is built around options to keep it consistent with the rest of the lego CLI interface. Since the --server option is global, it is not included in the interface of the command. While --email is also a global option, it makes sense to list it explicitly.

Since lego uses emails as account identifier, storage data should be updated as well:

  • The directory $LEGO_PATH/accounts/$LEGO_SERVER/user@domain.example should be renamed.
  • All occurrences of the old email inside $LEGO_PATH/accounts/$LEGO_SERVER/user@domain.example/account.json should be replaced.

Once done, the user should be reminded to update the --email option for all commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions