Skip to content

Commit

Permalink
Document command line escaping for arguments that start with a dash (p…
Browse files Browse the repository at this point in the history
…ython-poetry#4552)

Document a solution for using passwords that start with a dash. This happened to a few people when using automatically generated tokens in a CI environment.

Fixes python-poetry#2889

Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
  • Loading branch information
2 people authored and 1nF0rmed committed Nov 15, 2021
1 parent bd5eecc commit 62068e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ export POETRY_HTTP_BASIC_PYPI_PASSWORD=password
See [Using environment variables]({{< relref "configuration#using-environment-variables" >}}) for more information
on how to configure Poetry with environment variables.

If your password starts with a dash (e.g. randomly generated tokens in a CI environment), it will be parsed as a
command line option instead of a password.
You can prevent this by adding double dashes to prevent any following argument from being parsed as an option.

```bash
poetry config -- http-basic.pypi myUsername -myPasswordStartingWithDash
```

#### Custom certificate authority and mutual TLS authentication
Poetry supports repositories that are secured by a custom certificate authority as well as those that require
certificate-based client authentication. The following will configure the "foo" repository to validate the repository's
Expand Down

0 comments on commit 62068e5

Please sign in to comment.