Skip to content

Commit 6cf0382

Browse files
authored
Update packaging-projects.rst
1 parent 3dc5d16 commit 6cf0382

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

source/tutorials/packaging-projects.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,19 @@ won't see that token again.**
392392

393393
.. _API token: https://test.pypi.org/help/#apitoken
394394

395+
Save your token in your `$HOME/.pypirc` file like this, including
396+
the ``pypi-`` prefix.
397+
398+
.. code-block:: text
399+
400+
[testpypi]
401+
username = __token__
402+
password = YOUR_TOKEN_HERE
403+
404+
.. note::
405+
406+
When uploading to pypi, you will need to create a new section, replacing `testpypi` with `pypi`.
407+
395408
Now that you are registered, you can use :ref:`twine` to upload the
396409
distribution packages. You'll need to install Twine:
397410

@@ -421,10 +434,6 @@ Once installed, run Twine to upload all of the archives under :file:`dist`:
421434
422435
py -m twine upload --repository testpypi dist/*
423436
424-
You will be prompted for a username and password. For the username,
425-
use ``__token__``. For the password, use the token value, including
426-
the ``pypi-`` prefix.
427-
428437
After the command completes, you should see output similar to this:
429438

430439
.. code-block::

0 commit comments

Comments
 (0)