Setting credentials fails when password starts with a hyphen
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: NixOS 21.05
-
Poetry version: 1.1.11
Issue
When setting repository credentials with poetry config http-basic.custom-repo gitlab-ci-token ${GITLAB_JOB_TOKEN}
the command will fail any time the GITLAB_JOB_TOKEN begins with a hyphen. The command line parser tries to treat the password as an option.
The current workaround is to use double hyphen e.g. poetry config http-basic.custom-repo -- gitlab-ci-token ${GITLAB_JOB_TOKEN}
This should either be fixed in the option parser, or the workaround documented in the manual.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Characters that are valid for user IDs and passwords - IBM
Understanding character limitations for user IDs and passwords is important because they are used throughout IBM® Business Automation Workflow to provide ...
Read more >Error when you create a user name that contains a special ...
A Windows Live error occurred while provisioning for "user+invalid_characters@contoso.com". The e-mail name contains invalid characters.
Read more >hand typing password always fails. - 1Password Community
Is it possible that the dashes included by iPassword when it generated the password are not the ones on the keys? I.e. it's...
Read more ><input type="password"> - HTML: HyperText Markup Language
When setting the value of a password control, line feed and carriage ... The input will fail constraint validation if the length of...
Read more >AWS::SecretsManager::Secret - AWS CloudFormation
A secret can be a password, a set of credentials such as a user name and password, ... cannot resolve those references, which...
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
Agreed, this is standard behavior of CLI applications, and there is no need for a workaround as the proper solution (
--
to terminate options parsing in the Unix tradition) is available. I’m leaving this open as this seems like an excellent FAQ candidate.this is just regular behaviour for command line programs. eg try to
grep
for a string that begins with a hyphen: it’ll try to interpret it as an option.See also #4853.
Nothing to do here.