Skip to content

Commit

Permalink
docs: Add warning about saving credentials
Browse files Browse the repository at this point in the history
- Added warning about saving credentials to command line history
- Added angle brackets around `username` and `password` in docs, to
signify templating
  • Loading branch information
Secrus committed May 30, 2022
1 parent 30c582d commit 4a13d2a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docs/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ poetry source add foo https://pypi.example.org/simple/
Then, assuming the repository requires authentication, configure credentials for it.

```bash
poetry config http-basic.foo username password
poetry config http-basic.foo <username> <password>
```

{{% warning %}}
Depending on your systems configuration, credentials might be saved in your command lines history.
{{% /warning %}}

Once this is done, you can add dependencies to your project from this source.

```bash
Expand All @@ -66,7 +70,7 @@ recommended to use a different name for your publishing repository.

```bash
poetry config repositories.foo-pub https://pypi.example.org/legacy/
poetry config http-basic.foo-pub username password
poetry config http-basic.foo-pub <username> <password>
```

{{% /note %}}
Expand Down Expand Up @@ -303,7 +307,7 @@ well as the path (`/legacy`) are different to it's simple API (`https://test.pyp
If you want to store your credentials for a specific repository, you can do so easily:

```bash
poetry config http-basic.foo username password
poetry config http-basic.foo <username> <password>
```

If you do not specify the password you will be prompted to write it.
Expand All @@ -324,7 +328,7 @@ If you still want to use your username and password, you can do so with the foll
call to `config`.

```bash
poetry config http-basic.pypi username password
poetry config http-basic.pypi <username> <password>
```

{{% /note %}}
Expand Down Expand Up @@ -355,8 +359,8 @@ Alternatively, you can use environment variables to provide the credentials:

```bash
export POETRY_PYPI_TOKEN_PYPI=my-token
export POETRY_HTTP_BASIC_PYPI_USERNAME=username
export POETRY_HTTP_BASIC_PYPI_PASSWORD=password
export POETRY_HTTP_BASIC_PYPI_USERNAME=<username>
export POETRY_HTTP_BASIC_PYPI_PASSWORD=<password>
```

See [Using environment variables]({{< relref "configuration#using-environment-variables" >}}) for more information
Expand Down

0 comments on commit 4a13d2a

Please sign in to comment.