Commit 206cd098 authored by Kate Grechishkina's avatar Kate Grechishkina

Change __token__ to token_username in pypi docs

parent 6c9c3b7e
...@@ -174,11 +174,10 @@ index-servers = ...@@ -174,11 +174,10 @@ index-servers =
[gitlab] [gitlab]
repository = https://gitlab.example.com/api/v4/projects/<project_id>/packages/pypi repository = https://gitlab.example.com/api/v4/projects/<project_id>/packages/pypi
username = __token__ username = <your_personal_access_token_name>
password = <your personal access token> password = <your_personal_access_token>
``` ```
- `username` must be `__token__` exactly.
- Your project ID is on your project's home page. - Your project ID is on your project's home page.
### Authenticate with a deploy token ### Authenticate with a deploy token
...@@ -317,10 +316,11 @@ more than once, a `404 Bad Request` error occurs. ...@@ -317,10 +316,11 @@ more than once, a `404 Bad Request` error occurs.
To install the latest version of a package, use the following command: To install the latest version of a package, use the following command:
```shell ```shell
pip install --index-url https://__token__:<personal_access_token>@gitlab.example.com/api/v4/projects/<project_id>/packages/pypi/simple --no-deps <package_name> pip install --index-url https://<personal_access_token_name>:<personal_access_token>@gitlab.example.com/api/v4/projects/<project_id>/packages/pypi/simple --no-deps <package_name>
``` ```
- `<package_name>` is the package name. - `<package_name>` is the package name.
- `<personal_access_token_name>` is a personal access token name with the `read_api` scope.
- `<personal_access_token>` is a personal access token with the `read_api` scope. - `<personal_access_token>` is a personal access token with the `read_api` scope.
- `<project_id>` is the project ID. - `<project_id>` is the project ID.
...@@ -334,13 +334,13 @@ If you were following the guide and want to install the ...@@ -334,13 +334,13 @@ If you were following the guide and want to install the
`MyPyPiPackage` package, you can run: `MyPyPiPackage` package, you can run:
```shell ```shell
pip install mypypipackage --no-deps --index-url https://__token__:<personal_access_token>@gitlab.example.com/api/v4/projects/<your_project_id>/packages/pypi/simple pip install mypypipackage --no-deps --index-url https://<personal_access_token_name>:<personal_access_token>@gitlab.example.com/api/v4/projects/<your_project_id>/packages/pypi/simple
``` ```
This message indicates that the package was installed successfully: This message indicates that the package was installed successfully:
```plaintext ```plaintext
Looking in indexes: https://__token__:****@gitlab.example.com/api/v4/projects/<your_project_id>/packages/pypi/simple Looking in indexes: https://<personal_access_token_name>:****@gitlab.example.com/api/v4/projects/<your_project_id>/packages/pypi/simple
Collecting mypypipackage Collecting mypypipackage
Downloading https://gitlab.example.com/api/v4/projects/<your_project_id>/packages/pypi/files/d53334205552a355fee8ca35a164512ef7334f33d309e60240d57073ee4386e6/mypypipackage-0.0.1-py3-none-any.whl (1.6 kB) Downloading https://gitlab.example.com/api/v4/projects/<your_project_id>/packages/pypi/files/d53334205552a355fee8ca35a164512ef7334f33d309e60240d57073ee4386e6/mypypipackage-0.0.1-py3-none-any.whl (1.6 kB)
Installing collected packages: mypypipackage Installing collected packages: mypypipackage
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment