Skip to content

Setting credentials fails when password starts with a hyphen #4699

@twoolie

Description

@twoolie
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docsDocumentation issues/improvementsarea/docs/faqFrequently duplicated/potential addition to FAQ

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions