Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mn create-acme-account help output misleading about existing keys #155

Closed
msgilligan opened this issue Jul 7, 2021 · 3 comments
Closed

Comments

@msgilligan
Copy link
Contributor

msgilligan commented Jul 7, 2021

The documentation for mn create-acme-account says "This command will either create a new account keypair for you or you can pass the account keypair that you have generated using the mn create-key or via openssl or other means in as a parameter." (And the command does seem to behave according to the documentation.)

However the command help implies a key is always created.

Steps to Reproduce

  1. mn create-acme-account --help

Expected Behaviour

  • Help output should indicate an existing key can be used

Actual Behaviour

Usage: mn create-acme-account [-fhvVx] -e=<email> [-k=<keyDir>] -n=<keyName> [-s=<keySize>]
                              (-u=<serverUrl> | --lets-encrypt-prod | --lets-encrypt-staging)
Creates a new account on the given ACME server
  -e, --email=<email>        Email address to create account with.
  -f, --force                Whether to overwrite existing files
  -h, --help                 Show this help message and exit.
  -k, --key-dir=<keyDir>     Custom location on disk to put the key to be used with this
                               account.
                               Default: src/main/resources
  -n, --key-name=<keyName>   Name of the key to be created
  -s, --key-size=<keySize>   Size of the key to be generated
                               Default: 4096
  -v, --verbose              Create verbose output.
  -V, --version              Print version information and exit.
  -x, --stacktrace           Show full stack trace when exceptions occur.
ACME server URL
      --lets-encrypt-prod    Use the Let's Encrypt prod URL.
      --lets-encrypt-staging Use the Let's Encrypt staging URL
  -u, --url=<serverUrl>      URL of ACME server to use

Environment Information

  • Operating System: macOS Big Sur
  • Micronaut Version: 2.5.6
  • JDK Version: 16
@msgilligan
Copy link
Contributor Author

msgilligan commented Jul 7, 2021

Weird, I just ran mn create-acme-account another time (this time with --lets-encrypt-prod option) and got the following output:

Key already exists and can be found here : ~/xxx/account-key.pem. If you want to overwrite it use the -f/--force flag.
Account creation complete. Make sure to store your account pem somewhere safe as it is your only way to access your account.

@msgilligan
Copy link
Contributor Author

msgilligan commented Jul 7, 2021

OK, the create key output was correct -- the problem was I was using ~ in the directory path and it wasn't being substituted.

However, the --help output is still misleading.

NOTE: Issue title and first comment have been updated to reflect that the problem is only with --help output.

@msgilligan msgilligan changed the title mn create-acme-account help and command output misleading about existing keys mn create-acme-account help output misleading about existing keys Jul 7, 2021
@msgilligan
Copy link
Contributor Author

Since the actual code is in the micronaut-starter project, I opened an issue over there:
micronaut-projects/micronaut-starter#849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant