Why am I getting Error 405 while uploading my package to https://test.pypi.org/legacy?

ant ant at anthive.com
Sun Dec 23 15:49:44 EST 2018


ant wrote:

...

> .pypirc 
>=====
> [distutils]
> index-servers=
>     testpypi
>
> [testpypi]
> repository: https://test.pypi.org/legacy/
> username: UserName
> password: Password
>=====
>
>
> and my upload command is:
>
>
>=====
> #!/bin/sh
> #
> # upload ngfp to test pypi
>
> NGFP_SRC_HOME="/home/me/src/salsa/ngfp"
> if test ! -d "$NGFP_SRC_HOME" ; then
>   echo "  directory $NGFP_SRC_HOME does not exist!"
>   exit
> fi
>
> cd $NGFP_SRC_HOME
>
> twine upload --repository testpypi dist/*
>=====


  since i just went through this myself i thought i'd
add a bit more.

  when you change over to post to the main pypi.org
you need to do it to upload.pypi.org like:

=====
[pypi]
repository: https://upload.pypi.org/legacy/
=====

  as i was getting 405 errors when using just pypi.org
i suspect your error above is that you're not using the
/legacy/ part at the end...

  good luck!


  ant


More information about the Python-list mailing list