Repository: certbot/certbot

Issue:
Broken letsencrypt --standalone
```
(venv)root@le:~/letsencrypt# git rev-parse HEAD
cb2ac71d1ee48205e6756fa3264551ae24b6eae2
(venv)root@le:~/letsencrypt# letsencrypt --help

  letsencrypt [SUBCOMMAND] [options] [-d domain] [-d domain] ...

The Let's Encrypt agent can obtain and install HTTPS/TLS/SSL certificates.  By
default, it will attempt to use a webserver both for obtaining and installing
the cert.  Major SUBCOMMANDS are:

  (default) everything Obtain & install a cert in your current webserver
  auth                 Authenticate & obtain cert, but do not install it
  install              Install a previously obtained cert in a server
  revoke               Revoke a previously obtained certificate
  rollback             Rollback server configuration changes made during install
  config_changes       Show changes made to server config during installation

Choice of server for authentication/installation:

  --apache          Use the Apache plugin for authentication & installation
  --nginx           Use the Nginx plugin for authentication & installation
  --standalone      Run a standalone HTTPS server (for authentication only)
  OR:
  --authenticator standalone --installer nginx

More detailed help:

  -h, --help [topic]    print this message, or detailed help on a topic;
                        the available topics are:

   all, apache, automation, manual, nginx, paths, security, testing, or any of
   the subcommands

(venv)root@le:~/letsencrypt# letsencrypt --standalone
usage: 
  letsencrypt [SUBCOMMAND] [options] [-d domain] [-d domain] ...

The Let's Encrypt agent can obtain and install HTTPS/TLS/SSL certificates.  By
default, it will attempt to use a webserver both for obtaining and installing
the cert.  
letsencrypt: error: argument --standalone-supported-challenges: Unrecognized challenges: run
```



Discussion:

Resolving patch:
diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py
--- a/letsencrypt/cli.py
+++ b/letsencrypt/cli.py
@@ -60,7 +60,7 @@
 # altogether
 USAGE = SHORT_USAGE + """Major SUBCOMMANDS are:
 
-  (default) everything Obtain & install a cert in your current webserver
+  (default) run        Obtain & install a cert in your current webserver
   auth                 Authenticate & obtain cert, but do not install it
   install              Install a previously obtained cert in a server
   revoke               Revoke a previously obtained certificate
@@ -71,7 +71,7 @@
 
   --apache          Use the Apache plugin for authentication & installation
   --nginx           Use the Nginx plugin for authentication & installation
-  --standalone      Run a standalone HTTPS server (for authentication only)
+  --standalone      Run a standalone webserver for authentication
   OR:
   --authenticator standalone --installer nginx
 
@@ -382,6 +382,8 @@ def choose_configurator_plugins(args, config, plugins, verb):
     if args.apache:
         req_inst = set_configurator(req_inst, "apache")
         req_auth = set_configurator(req_auth, "apache")
+    if args.standalone:
+        req_auth = set_configurator(req_auth, "standalone")
     logger.debug("Requested authenticator %s and installer %s", req_auth, req_inst)
 
     # Try to meet the user's request and/or ask them to pick plugins
@@ -740,10 +742,6 @@ def create_parser(plugins, args):
         None, "-t", "--text", dest="text_mode", action="store_true",
         help="Use the text output instead of the curses UI.")
     helpful.add(None, "-m", "--email", help=config_help("email"))
-    helpful.add(None, "--apache", action="store_true",
-                help="Obtain and install certs using Apache")
-    helpful.add(None, "--nginx", action="store_true",
-                help="Obtain and install certs using Nginx")
     # positional arg shadows --domains, instead of appending, and
     # --domains is useful, because it can be stored in config
     #for subparser in parser_run, parser_auth, parser_install:
@@ -856,7 +854,6 @@ def add_subparser(name):  # pylint: disable=missing-docstring
                 "--checkpoints", type=int, metavar="N",
                 default=flag_default("rollback_checkpoints"),
                 help="Revert configuration N number of checkpoints.")
-
     helpful.add("plugins",
                 "--init", action="store_true", help="Initialize plugins.")
     helpful.add("plugins",
@@ -921,6 +918,12 @@ def _plugins_parsing(helpful, plugins):
         "plugins", "--configurator", help="Name of the plugin that is "
         "both an authenticator and an installer. Should not be used "
         "together with --authenticator or --installer.")
+    helpful.add("plugins", "--apache", action="store_true",
+                help="Obtain and install certs using Apache")
+    helpful.add("plugins", "--nginx", action="store_true",
+                help="Obtain and install certs using Nginx")
+    helpful.add("plugins", "--standalone", action="store_true",
+                help='Obtain certs using a "standalone" webserver.')
 
     # things should not be reorder past/pre this comment:
     # plugins_group should be displayed in --help before plugin


Test patch: