I am running this devpi docker container
as per instruction I have setup password in the environment variable DEVPI_PASSWORD to devpi then
I have setup ~/.pypirc file
[devpi]
repository:http://127.0.0.1:3141/root/pypi
username:root
password:devpi
but on trying to upload (to update it as it contains the old version of my package )the python package I get the error
$ twine upload -r devpi dist/*.tar.gz
Uploading distributions to http://127.0.0.1:3141/root/pypi
Uploading maildiff-1.3.0.tar.gz
100%|███████████████████████████████████████| 16.4k/16.4k [00:00<00:00, 667kB/s]
HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:3141/root/pypi
so what should be the client URL ?
/root/pypi
is a read-only proxy link to the PyPI repo at https://pypi.org. Its purpose is to install packages when they are not available on your localdevpi
instance. To upload packages to the local instance, you need to create a non-root user and an index first. On your host, start the container and (assuming the port mapping from container to host worked) issue:If you get the error
devpi: command not found
, stop the container and installdevpi-client
on your host:Now you have an index
http://127.0.0.1:3141/me/myindex
you can upload to. The configuration in.pypirc
changes to:Installing from the index will work by passing the index url to
pip
: