我已经pip
安装pypirc
并设置了一个~/.pypirc
带有必要密码的文件。为什么twine
每次python setup.py
调用都要求输入密码?
$twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Enter your username:
这是.pypirc
[distutils] # this tells distutils what package indexes you can push to
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: myuser
password: mypwd
[pypitest]
repository: https://testpypi.python.org/pypi
username: myuser
password: mypwd
更新不包括--repository-url
给:
UploadToDeprecatedPyPIDetected: You're trying to upload to the legacy PyPI site 'https://pypi.python.org/pypi'. Uploading to those sites is deprecated.
The new sites are pypi.org and test.pypi.org. Try using https://upload.pypi.org/legacy/ (or https://test.pypi.org/legacy/) to upload your packages instead. These are the default URLs for Twine now.
More at https://packaging.python.org/guides/migrating-to-pypi-org/ .