From 4a13d2a6807c7e48819a1a839a0bee75fe458f37 Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Tue, 31 May 2022 00:45:06 +0200 Subject: [PATCH] docs: Add warning about saving credentials - Added warning about saving credentials to command line history - Added angle brackets around `username` and `password` in docs, to signify templating --- docs/repositories.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/repositories.md b/docs/repositories.md index 8cb852c9401..fa2c48bd599 100644 --- a/docs/repositories.md +++ b/docs/repositories.md @@ -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 ``` +{{% 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 @@ -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 ``` {{% /note %}} @@ -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 ``` If you do not specify the password you will be prompted to write it. @@ -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 ``` {{% /note %}} @@ -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= +export POETRY_HTTP_BASIC_PYPI_PASSWORD= ``` See [Using environment variables]({{< relref "configuration#using-environment-variables" >}}) for more information