我已经安装了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/ .
发布于 2019-09-14 13:39:23
twine upload dist/*
或
twine upload -r pypi dist/*
或
twine upload -r pypitest dist/*
据我所知,twine --repository-url <url>
甚至不咨询~/.pypirc
。使用-r <name>
,它查找~/.pypirc
的网址、用户名和密码。如果您省略了-r <name>
,则twine使用~/.pypirc
中的第一个回购。
发布于 2022-01-19 06:53:08
方法1:
python -m twine upload dist/* -u%username% -p%password%
你可以的
设置username="token“
设置password=“pypi.”
或
设置username=pypi名称
设置password=pypi密码
发布于 2021-11-27 20:34:08
只需在c:\user\your name中找到.pypirc
会管用的..。
https://stackoverflow.com/questions/57935191
复制相似问题