Http basic config password starting with "-"
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: ubuntu 20.04 (also tested on mac)
- Poetry version: 1.0.10
- Link of a Gist with the contents of your pyproject.toml file: N/A
Issue
I way to use poetry with a private repository, as described in the documentation I run:
poetry -vvv config http-basic.foo username "-some_password"
Note the -
at the beginning of the password
I have the following error:
[NoSuchOptionException]
The "-s" option does not exist.
Traceback (most recent call last):
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/console_application.py", line 123, in run
io = io_factory(
File "/home/jeremad/.poetry/lib/poetry/console/config/application_config.py", line 168, in create_io
resolved_command = application.resolve_command(args)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/console_application.py", line 110, in resolve_command
return self._config.command_resolver.resolve(args, self)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/resolver/default_resolver.py", line 43, in resolve
result = self.process_default_commands(args, application.default_commands)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/resolver/default_resolver.py", line 104, in process_default_commands
if resolved_command.is_parsable():
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/resolver/resolve_result.py", line 43, in is_parsable
self._parse()
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/resolver/resolve_result.py", line 49, in _parse
self._parsed_args = self._command.parse(self._raw_args)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/api/command/command.py", line 113, in parse
return self._config.args_parser.parse(args, self._args_format, lenient)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/args/default_args_parser.py", line 53, in parse
self._parse(args, _fmt, lenient)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/args/default_args_parser.py", line 103, in _parse
self._parse_short_option(token, tokens, fmt, lenient)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/args/default_args_parser.py", line 258, in _parse_short_option
self._parse_short_option_set(name, tokens, fmt, lenient)
File "/home/jeremad/.poetry/lib/poetry/_vendor/py3.8/clikit/args/default_args_parser.py", line 280, in _parse_short_option_set
raise NoSuchOptionException(name[i])
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Restricting Access with HTTP Basic Authentication | NGINX Plus
You can restrict access to your website or some parts of it by implementing a username/password authentication. Usernames and passwords are taken from...
Read more >HTTP authentication - MDN Web Docs - Mozilla
The "Basic" HTTP authentication scheme is defined in RFC 7617, which transmits credentials as user ID/password pairs, encoded using base64.
Read more >HTTP Basic Auth | Confluent Platform 5.2.1
Configure HTTPS for the REST Proxy interface. Login to your REST Proxy with the username thisismyusername and the password thisismypass . The ...
Read more >Can you pass user/pass for HTTP Basic Authentication in URL ...
It is indeed not possible to pass the username and password via query parameters in standard HTTP auth. Instead, you use a special...
Read more >How To Set Up Password Authentication with Apache on ...
To get started, you will need access to an Ubuntu 14.04 server environment. ... Configure Apache Password Authentication.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m not sure if this really was a bug in the first place, but rather unfortunate CLI design instead. When configuring basic auth credentials, only the username is required, and the password is optional. So the parser is given the choice if you’re providing another optional argument or if you’re inputting options, and I’d go for parsing it as options as well.
Maybe it makes sense to document this here?
If what @DrLuke says is true, then this bug can be closed as it must have been fixed in a newer release (mind you, the bug is already a year old).
I do not have the rights to close it, but @abn is probably allowed to close this issue till further notice then.